/* ═══════════════════════════════════════════════
   BMB — Be My Butler · Shared Stylesheet
   Extracted from index.html + mobile/i18n additions
   ═══════════════════════════════════════════════ */

:root {
  --bg: #0a0e17;
  --surface: #111827;
  --surface-2: #1a2234;
  --surface-3: #243049;
  --border: #1e3a5f;
  --border-glow: #2563eb33;
  --text: #e8edf5;
  --text-muted: #8494a7;
  --text-dim: #5a6b80;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --green: #22c55e;
  --green-dim: #16a34a;
  --amber: #f59e0b;
  --red: #ef4444;
  --purple: #a78bfa;
  --purple-deep: #7c3aed;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --gradient-hero: linear-gradient(135deg, #1e3a5f 0%, #0a0e17 50%, #1a0e2e 100%);
  --gradient-blue: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-green: linear-gradient(135deg, #22c55e, #3b82f6);
  --gradient-amber: linear-gradient(135deg, #f59e0b, #ef4444);
  --gradient-purple: linear-gradient(135deg, #8b5cf6, #ec4899);
  --gradient-cyan: linear-gradient(135deg, #22d3ee, #3b82f6);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(59,130,246,0.08);
}

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

body {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', 'Hiragino Sans', 'Yu Gothic', 'Microsoft JhengHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── Scrollbar ────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── Hero ─────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 100px 24px 80px;
  background: var(--gradient-hero);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 20%, rgba(59,130,246,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(139,92,246,0.06) 0%, transparent 50%);
  animation: aurora 20s ease-in-out infinite alternate;
}
@keyframes aurora {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-5%, 5%) rotate(3deg); }
}
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  color: var(--accent-light);
  margin-bottom: 32px;
}
.hero-badge .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero h1 .gradient-text {
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 40px;
  font-weight: 300;
  line-height: 1.8;
}
.hero-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}
.stat {
  text-align: center;
  padding: 16px 24px;
}
.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ─── Navigation ───────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,14,23,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.nav-inner {
  display: flex;
  gap: 4px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 24px;
  overflow-x: auto;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.nav a:hover {
  color: var(--accent-light);
  background: rgba(59,130,246,0.08);
}

/* ─── Container ────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Sections ─────────────────────────────── */
section {
  padding: 80px 0;
  border-bottom: 1px solid rgba(30,58,95,0.3);
}
section:last-child { border-bottom: none; }
.section-header {
  margin-bottom: 48px;
}
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
}
h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  line-height: 1.8;
}
h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 40px 0 20px;
  color: var(--text);
}

/* ─── Cards ────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.card-grid-3 {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-blue);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card:hover {
  border-color: rgba(59,130,246,0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}
.card:hover::before { opacity: 1; }
.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}
.card-icon.opus { background: rgba(167,139,250,0.12); color: var(--purple); border: 1px solid rgba(167,139,250,0.15); }
.card-icon.sonnet { background: rgba(34,197,94,0.1); color: var(--green); border: 1px solid rgba(34,197,94,0.15); }
.card-icon.lead { background: rgba(59,130,246,0.1); color: var(--accent-light); border: 1px solid rgba(59,130,246,0.15); }
.card-icon.cross { background: rgba(245,158,11,0.1); color: var(--amber); border: 1px solid rgba(245,158,11,0.15); }
.card-icon.new { background: rgba(34,211,238,0.1); color: var(--cyan); border: 1px solid rgba(34,211,238,0.15); }
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-model {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(59,130,246,0.08);
  color: var(--accent-light);
  border: 1px solid rgba(59,130,246,0.12);
}
.tag.green { background: rgba(34,197,94,0.08); color: var(--green); border-color: rgba(34,197,94,0.12); }
.tag.purple { background: rgba(167,139,250,0.08); color: var(--purple); border-color: rgba(167,139,250,0.12); }
.tag.amber { background: rgba(245,158,11,0.08); color: var(--amber); border-color: rgba(245,158,11,0.12); }
.tag.cyan { background: rgba(34,211,238,0.08); color: var(--cyan); border-color: rgba(34,211,238,0.12); }

/* ─── Tables ───────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
thead {
  background: var(--surface-2);
}
th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(30,58,95,0.2);
  color: var(--text-muted);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(59,130,246,0.02); }
td:first-child { color: var(--text); font-weight: 500; }

/* ─── Accordion Pipeline ─────────────────────── */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 32px 0;
  position: relative;
}
.accordion::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--purple-deep), var(--green));
}
.accordion-item {
  position: relative;
}
.accordion-header {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  cursor: pointer;
  position: relative;
  user-select: none;
}
.accordion-header:hover .step-num {
  border-color: var(--accent);
  color: var(--accent-light);
  box-shadow: 0 0 20px rgba(59,130,246,0.15);
}
.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
  z-index: 1;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  transition: all 0.3s ease;
}
.accordion-summary {
  flex: 1;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
}
.accordion-title-wrap { flex: 1; }
.step-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.step-agents {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.agent-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.agent-pill.opus { background: rgba(167,139,250,0.12); color: var(--purple); }
.agent-pill.sonnet { background: rgba(34,197,94,0.1); color: var(--green); }
.agent-pill.lead-pill { background: rgba(59,130,246,0.1); color: var(--accent-light); }
.agent-pill.cross-pill { background: rgba(245,158,11,0.1); color: var(--amber); }
.accordion-chevron {
  color: var(--text-dim);
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  margin-left: 80px;
}
.accordion-item.open .accordion-body {
  max-height: 500px;
}
.accordion-detail {
  padding: 0 0 20px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}
.accordion-detail .step-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ─── Blind Wall Diagram ───────────────────── */
.blind-wall {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  margin: 32px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.blind-track {
  padding: 32px;
  background: var(--surface);
}
.blind-track h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.blind-track.claude { border-right: none; }
.blind-track.cross { border-left: none; }
.blind-separator {
  width: 48px;
  background: repeating-linear-gradient(
    0deg,
    var(--red) 0px,
    var(--red) 4px,
    transparent 4px,
    transparent 12px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.blind-separator span {
  background: var(--bg);
  color: var(--red);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 12px 4px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.blind-detail {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.8;
}
.blind-detail strong { color: var(--text); }

/* ─── Code blocks ──────────────────────────── */
.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 20px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: pre;
}
.code-block .comment { color: var(--text-dim); }
.code-block .keyword { color: var(--purple); }
.code-block .string { color: var(--green); }
.code-block .function { color: var(--accent-light); }

/* ─── Comparison ───────────────────────────── */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0;
}
.comparison-col {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.comparison-header {
  padding: 16px 24px;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.comparison-col.old .comparison-header {
  background: rgba(239,68,68,0.06);
  color: var(--red);
}
.comparison-col.new .comparison-header {
  background: rgba(34,197,94,0.06);
  color: var(--green);
}
.comparison-body {
  padding: 20px 24px;
  background: var(--surface);
}
.comparison-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(30,58,95,0.15);
}
.comparison-item:last-child { border-bottom: none; }
.comparison-item .label { color: var(--text); font-weight: 500; min-width: 120px; }

/* ─── Tier diagram ─────────────────────────── */
.tier-diagram {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 32px 0;
}
.tier {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.25s ease;
}
.tier:hover {
  border-color: rgba(59,130,246,0.3);
  transform: translateX(4px);
}
.tier-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 800;
  min-width: 40px;
}
.tier:nth-child(1) .tier-num { color: var(--accent-light); }
.tier:nth-child(2) .tier-num { color: var(--purple); }
.tier:nth-child(3) .tier-num { color: var(--green); }
.tier-content { flex: 1; }
.tier-title { font-weight: 700; margin-bottom: 4px; }
.tier-desc { font-size: 0.88rem; color: var(--text-muted); }
.tier-arrow {
  color: var(--text-dim);
  font-size: 1.2rem;
}

/* ─── Recipe Cards ─────────────────────────── */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.recipe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.recipe-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.25s;
}
.recipe-card:hover { border-color: rgba(59,130,246,0.3); transform: translateY(-3px); box-shadow: var(--shadow-glow); }
.recipe-card:hover::before { opacity: 1; }
.recipe-card.feature::before { background: var(--gradient-blue); }
.recipe-card.bugfix::before { background: var(--gradient-amber); }
.recipe-card.refactor::before { background: var(--gradient-purple); }
.recipe-card.research::before { background: var(--gradient-cyan); }
.recipe-card.review-r::before { background: var(--gradient-green); }
.recipe-card.infra::before { background: linear-gradient(135deg, var(--text-dim), var(--accent)); }
.recipe-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.recipe-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: capitalize;
}
.recipe-chain {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 12px;
}
.recipe-chain .arrow { color: var(--text-dim); }
.recipe-flags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ─── Directory Tree ───────────────────────── */
.dir-tree {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 2;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: pre;
}
.dir-tree .folder { color: var(--accent-light); font-weight: 600; }
.dir-tree .file { color: var(--text-muted); }
.dir-tree .desc { color: var(--text-dim); font-family: 'IBM Plex Sans', sans-serif; font-size: 0.78rem; }

/* ─── Mermaid ──────────────────────────────── */
.mermaid-wrap {
  margin: 32px 0;
  overflow-x: auto;
}
.mermaid {
  text-align: center;
}

/* ─── Footer ───────────────────────────────── */
footer {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-dim);
  font-size: 0.85rem;
}
footer .logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-blue);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
}

/* ─── Slide Mode Toggle Button ────────────── */
.slide-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
  letter-spacing: 0.03em;
}
.slide-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  box-shadow: 0 0 20px rgba(59,130,246,0.15);
}

/* ─── Slide Mode ────────────────────────────── */
body.slide-mode { overflow: hidden; }
body.slide-mode .hero,
body.slide-mode section {
  display: none;
  min-height: 100vh;
  padding: 60px 0;
  align-items: center;
  border-bottom: none;
}
body.slide-mode .hero {
  justify-content: center;
  padding: 0 24px;
}
body.slide-mode .hero.active-slide,
body.slide-mode section.active-slide {
  display: flex;
  animation: slideFadeIn 0.3s ease;
}
body.slide-mode section.active-slide {
  flex-direction: column;
  justify-content: center;
}
body.slide-mode section.active-slide > .container {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
body.slide-mode footer { display: none; }

@keyframes slideFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ─── Slide Indicator ───────────────────────── */
.slide-indicator {
  display: none;
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 20px;
  backdrop-filter: blur(12px);
  letter-spacing: 0.05em;
}
body.slide-mode .slide-indicator { display: block; }

/* ─── Slide nav hint ────────────────────────── */
.slide-hint {
  display: none;
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 200;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}
body.slide-mode .slide-hint { display: block; }

/* ─── Pagination Dots (mobile slide mode) ──── */
.slide-dots {
  display: none;
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  gap: 6px;
  align-items: center;
}
.slide-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  opacity: 0.4;
  transition: all 0.3s ease;
}
.slide-dots .dot.active {
  opacity: 1;
  background: var(--accent-light);
  transform: scale(1.3);
}

/* ─── Language Switcher (desktop) ────────────── */
.lang-switcher {
  position: fixed;
  top: 16px;
  right: 160px;
  z-index: 200;
}
.lang-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
}
.lang-btn:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  min-width: 140px;
  box-shadow: var(--shadow);
}
.lang-dropdown.open { display: block; }
.lang-dropdown a {
  display: block;
  padding: 10px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}
.lang-dropdown a:hover { background: rgba(59,130,246,0.08); color: var(--accent-light); }
.lang-dropdown a.active { color: var(--accent-light); background: rgba(59,130,246,0.05); }

/* ─── Hamburger Menu (mobile) ────────────────── */
.hamburger {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 310;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  backdrop-filter: blur(12px);
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── Mobile Drawer ──────────────────────────── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.drawer-overlay.open { display: block; opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 305;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.drawer.open { right: 0; }

.drawer-nav {
  flex: 1;
  padding: 72px 20px 20px;
}
.drawer-nav a {
  display: block;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.drawer-nav a:hover,
.drawer-nav a.active { color: var(--accent-light); background: rgba(59,130,246,0.08); }

.drawer-lang {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.drawer-lang-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.drawer-lang a {
  display: inline-block;
  padding: 6px 12px;
  margin: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}
.drawer-lang a:hover { border-color: var(--accent); color: var(--accent-light); }
.drawer-lang a.active { border-color: var(--accent); color: var(--accent-light); background: rgba(59,130,246,0.08); }

/* ─── Mermaid scroll hint (mobile) ─────────── */
.mermaid-hint {
  display: none;
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   MOBILE — Complete separate layout (≤768px)
   Vertical scroll only. No slide mode.
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* ─── Hide desktop-only elements ──────── */
  .nav { display: none; }
  .slide-toggle { display: none; }
  .lang-switcher { display: none; }
  .slide-hint { display: none !important; }
  .slide-indicator { display: none !important; }
  .slide-dots { display: none !important; }

  /* ─── Show mobile elements ────────────── */
  .hamburger { display: flex; }
  .mermaid-hint { display: block; }
  .mermaid-wrap { position: relative; }

  /* ─── Force scroll mode (override slide) ─ */
  body.slide-mode { overflow: auto !important; }
  body.slide-mode .hero,
  body.slide-mode section {
    display: block !important;
    min-height: auto !important;
    animation: none !important;
  }
  body.slide-mode section > .container {
    max-height: none !important;
    overflow: visible !important;
  }
  body.slide-mode footer { display: block !important; }

  /* ─── Hero ────────────────────────────── */
  .hero { padding: 72px 16px 48px; }
  .hero h1 { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .hero .subtitle { font-size: 0.95rem; margin-bottom: 28px; }
  .hero-stats { gap: 8px; }
  .stat { padding: 10px 14px; }
  .stat-value { font-size: 1.4rem; }
  .stat-label { font-size: 0.68rem; }
  .hero-lang-bar a { font-size: 0.72rem !important; padding: 4px 10px !important; }

  /* ─── Sections ────────────────────────── */
  section { padding: 48px 0; }
  .container { padding: 0 16px; }
  .section-header { margin-bottom: 28px; }
  .section-label { font-size: 0.68rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.1rem; margin: 28px 0 14px; }
  .section-desc { font-size: 0.92rem; }

  /* ─── Cards — single column, compact ──── */
  .card-grid, .card-grid-3, .recipe-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .card { padding: 20px; }
  .card:hover { transform: none; } /* No hover lift on mobile */
  .card-header { gap: 10px; margin-bottom: 10px; }
  .card-icon { width: 36px; height: 36px; font-size: 0.85rem; border-radius: 10px; }
  .card-title { font-size: 0.95rem; }
  .card-desc { font-size: 0.84rem; }
  .card-tags { gap: 4px; margin-top: 10px; }
  .tag { font-size: 0.62rem; padding: 2px 7px; }

  /* ─── Tables — scrollable ─────────────── */
  .table-wrap { margin: 16px 0; }
  table { font-size: 0.78rem; }
  th { padding: 10px 12px; font-size: 0.7rem; }
  td { padding: 10px 12px; }

  /* ─── Accordion — compact ─────────────── */
  .accordion { margin: 20px 0; }
  .accordion::before { left: 22px; }
  .accordion-header { gap: 14px; padding: 12px 0; }
  .step-num { width: 44px; height: 44px; font-size: 0.75rem; }
  .accordion-summary { min-height: 44px; gap: 10px; }
  .step-title { font-size: 0.95rem; }
  .step-agents { gap: 3px; }
  .agent-pill { font-size: 0.58rem; padding: 1px 6px; }
  .accordion-body { margin-left: 58px; }
  .accordion-item.open .accordion-body { max-height: 600px; }
  .accordion-detail { font-size: 0.84rem; }

  /* ─── Blind Wall — stacked ────────────── */
  .blind-wall { grid-template-columns: 1fr; }
  .blind-separator {
    width: auto; height: 40px;
    writing-mode: horizontal-tb;
    background: repeating-linear-gradient(90deg, var(--red) 0px, var(--red) 4px, transparent 4px, transparent 12px);
  }
  .blind-separator span { writing-mode: horizontal-tb; font-size: 0.6rem; }
  .blind-track { padding: 20px; }

  /* ─── Comparison — stacked ────────────── */
  .comparison { grid-template-columns: 1fr; gap: 10px; }

  /* ─── Tier diagram ────────────────────── */
  .tier { padding: 16px; gap: 14px; }
  .tier:hover { transform: none; }
  .tier-num { font-size: 1.2rem; }
  .tier-title { font-size: 0.92rem; }
  .tier-desc { font-size: 0.82rem; }

  /* ─── Code blocks ─────────────────────── */
  .code-block { padding: 14px 16px; font-size: 0.72rem; line-height: 1.7; }

  /* ─── Directory tree ──────────────────── */
  .dir-tree { padding: 16px; font-size: 0.7rem; line-height: 1.8; }
  .dir-tree .desc { font-size: 0.66rem; }

  /* ─── Recipe cards ────────────────────── */
  .recipe-card { padding: 18px; }
  .recipe-card:hover { transform: none; }
  .recipe-icon { font-size: 1.2rem; margin-bottom: 8px; }
  .recipe-name { font-size: 0.98rem; }
  .recipe-chain { font-size: 0.68rem; }

  /* ─── Mermaid — scroll container ──────── */
  .mermaid-wrap { margin: 20px -16px; padding: 0 16px; }

  /* ─── Footer ──────────────────────────── */
  footer { padding: 40px 16px; }
  footer .logo-text { font-size: 1.2rem; }

  /* ─── Language banner — compact ───────── */
  .lang-banner { font-size: 0.78rem; padding: 8px 12px; gap: 8px; flex-wrap: wrap; justify-content: center; }
}

/* ─── Small phone (≤480px) — extra compact ── */
@media (max-width: 480px) {
  .hero { padding: 64px 12px 36px; }
  .hero h1 { font-size: 1.8rem; }
  .hero .subtitle { font-size: 0.88rem; }
  .stat-value { font-size: 1.2rem; }
  .stat-label { font-size: 0.62rem; }
  .container { padding: 0 12px; }
  h2 { font-size: 1.25rem; }
  .card { padding: 16px; }
  .step-num { width: 38px; height: 38px; font-size: 0.7rem; }
  .accordion-body { margin-left: 52px; }
  .accordion::before { left: 19px; }
}

/* ─── Reduced motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
  .hero-badge .pulse { animation: none; }
  .fade-in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
  }
  @keyframes fadeIn {
    to { opacity: 1; transform: translateY(0); }
  }
  section:nth-child(2) .fade-in { animation-delay: 0.1s; }
  section:nth-child(3) .fade-in { animation-delay: 0.15s; }
}

/* ─── Swipe transition (mobile) ────────────── */
body.slide-mode.swiping .hero.active-slide,
body.slide-mode.swiping section.active-slide {
  animation: none;
}
@keyframes slideOutLeft {
  to { transform: translateX(-100%); opacity: 0; }
}
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  to { transform: translateX(100%); opacity: 0; }
}
@keyframes slideInLeft {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
body.slide-mode .slide-enter-right {
  animation: slideInRight 0.3s ease forwards;
}
body.slide-mode .slide-enter-left {
  animation: slideInLeft 0.3s ease forwards;
}

/* ─── Language Detection Banner ────────────── */
.lang-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--accent);
  font-size: 0.88rem;
  color: var(--text);
  animation: slideBannerIn 0.3s ease;
}
@keyframes slideBannerIn {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
.lang-banner-btn {
  padding: 5px 16px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s;
}
.lang-banner-btn:hover { background: var(--accent-light); }
.lang-banner-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
  margin-left: 8px;
}
.lang-banner-close:hover { color: var(--text); }
