:root {
  --canvas: #fafaf9;
  --surface: #ffffff;
  --ink: #18181b;
  --secondary: #71717a;
  --muted: #a1a1aa;
  --border: #e4e4e7;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --actor-claude: #d97706;
  --actor-codex: #10b981;
  --actor-opencode: #8b5cf6;
  --actor-kimi: #3b82f6;
  --radius: 6px;
  --max-width: 1400px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', 'PingFang SC', 'Noto Sans SC', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--canvas); color: var(--ink); line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
code { font-family: var(--font-mono); font-size: 0.875em; padding: 2px 6px; background: var(--canvas); border: 1px solid var(--border); border-radius: 4px; color: var(--accent); }

.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(250, 250, 249, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.nav-logo { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 14px; color: var(--secondary); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-download { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius); padding: 10px 24px; font-size: 14px; font-weight: 500; border: 1px solid var(--border); color: var(--secondary); transition: all 0.2s; }
.nav-download:hover { border-color: var(--muted); color: var(--ink); }
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.3s; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius); padding: 10px 24px; font-size: 14px; font-weight: 500; transition: all 0.2s; cursor: pointer; border: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-outline { border: 1px solid var(--border); color: var(--secondary); }
.btn-outline:hover { border-color: var(--muted); color: var(--ink); }
.btn-outline-dark { border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); }
.btn-outline-dark:hover { border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 16px; }

.hero { max-width: var(--max-width); margin: 0 auto; padding: 128px 24px 128px; text-align: center; }
.hero-inner { max-width: var(--max-width); margin: 0 auto; }
.hero-label { margin-bottom: 20px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.hero-title { margin: 0 auto; font-size: 36px; font-weight: 700; line-height: 1.08; letter-spacing: -0.035em; color: var(--ink); }
@media (min-width: 768px) { .hero-title { font-size: 56px; } }
.hero-subtitle { margin: 20px auto 0; font-size: 16px; line-height: 1.6; color: var(--secondary); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 36px; }
.hero-flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 64px; font-size: 12px; color: var(--muted); }
.flow-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 16px; background: var(--surface); }
.flow-chip--accent { background: rgba(59, 130, 246, 0.1); border-color: transparent; color: var(--accent); }
.flow-arrow { color: var(--border); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot-claude { background: var(--actor-claude); }
.dot-codex { background: var(--actor-codex); }
.dot-opencode { background: var(--actor-opencode); }
.dot-kimi { background: var(--actor-kimi); }

.section { max-width: var(--max-width); margin: 0 auto; padding: 96px 24px; }
.section-head { margin: 0 auto 40px; text-align: center; }
.section-label { margin-bottom: 20px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.section-title { font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; color: var(--ink); }
@media (min-width: 768px) { .section-title { font-size: 36px; } }
.section-desc { margin: 16px auto 0; font-size: 16px; line-height: 1.625; color: var(--secondary); }

.card-grid { display: grid; gap: 12px; }
.card-grid-3 { grid-template-columns: 1fr; }
.card-grid-2 { grid-template-columns: 1fr; }
.card-grid-4 { grid-template-columns: 1fr; }
.card-grid-bento { }
@media (min-width: 640px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } .card-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid-4 { grid-template-columns: repeat(4, 1fr); } .card-grid-2 { grid-template-columns: repeat(2, 1fr); } }

.card { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: box-shadow 0.2s; }
.card:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); }
.card-icon { width: 28px; height: 28px; color: rgba(24,24,27,0.55); margin-bottom: 16px; }
.card-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; color: var(--ink); }
.card-title-lg { font-size: 18px; font-weight: 600; margin-bottom: 20px; color: var(--ink); }
.card-text { font-size: 16px; line-height: 1.625; color: var(--secondary); }
.card-tag { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 12px; }
.card-wide { grid-column: span 1; }
.card-tall { padding: 28px; }
.card-feature { margin-bottom: 16px; }
.card-feature:last-child { margin-bottom: 0; }
.card-feature-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; color: var(--ink); }
.card-feature-text { font-size: 14px; line-height: 1.625; color: var(--secondary); }
@media (min-width: 768px) { .card-wide { grid-column: span 2; } .card-grid-bento { grid-template-columns: repeat(3, 1fr); } }

.card-actor { text-align: left; }
.actor-name { font-family: var(--font-mono); font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.actor-role { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 16px; }
.text-claude { color: var(--actor-claude); }
.text-codex { color: var(--actor-codex); }
.text-opencode { color: var(--actor-opencode); }
.text-kimi { color: var(--actor-kimi); }
.actors-note { text-align: center; margin-top: 24px; font-size: 12px; color: var(--muted); }

.flow-steps { display: flex; flex-direction: column; align-items: stretch; gap: 16px; margin-bottom: 32px; }
@media (min-width: 768px) { .flow-steps { flex-direction: row; justify-content: center; } }
.flow-step { flex: 1; border-radius: var(--radius); padding: 20px 28px; text-align: center; }
.flow-step-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.6; margin-bottom: 4px; }
.flow-step-text { font-size: 15px; font-weight: 600; }
.flow-step--solid { background: var(--ink); color: var(--canvas); }
.flow-step--bordered { border: 2px solid var(--ink); color: var(--ink); }
.flow-step--light { border: 1px solid var(--border); color: var(--secondary); }
.flow-step--accent { background: var(--accent); color: #fff; }
.flow-step-arrow { display: none; font-size: 20px; color: var(--muted); align-self: center; }
@media (min-width: 768px) { .flow-step-arrow { display: flex; align-items: center; } }
.flow-desc { margin: 0 auto; text-align: center; font-size: 14px; line-height: 1.625; color: var(--secondary); }
.flow-note { margin: 12px auto 0; text-align: center; font-size: 12px; line-height: 1.625; color: var(--muted); }

.guide-box { margin: 40px auto 0; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.guide-box-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.guide-spark { width: 16px; height: 16px; color: var(--accent); }
.guide-box-text { font-size: 14px; line-height: 1.625; color: var(--secondary); }
.actor-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.actor-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--canvas); border-radius: 999px; padding: 6px 12px; font-size: 12px; color: var(--secondary); }
.guide-tip { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; font-size: 14px; line-height: 1.625; color: var(--secondary); }
.guide-tip-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--accent); }

.guide-steps { margin: 64px auto 0; display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .guide-steps { grid-template-columns: 1fr 1fr; } }
.guide-steps-title { grid-column: 1 / -1; text-align: center; font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 0; }
.guide-step { display: flex; gap: 20px; }
.guide-step-num { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--ink); color: var(--canvas); font-size: 14px; font-weight: 700; position: relative; z-index: 1; }
.guide-step-body { }
.guide-step:not(.guide-step--last) .guide-step-num::after { display: none; }
.guide-step-title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.guide-step-text { font-size: 14px; line-height: 1.625; color: var(--secondary); }
.guide-step:not(.guide-step--last) .guide-step-num::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: 1px; height: 48px; background: var(--border); }

.faq-list { margin: 0 auto; }
.faq-item { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; transition: border-color 0.2s; }
.faq-item[open] { border-color: var(--muted); }
.faq-item summary { padding: 20px 24px; font-size: 16px; font-weight: 600; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 22px; color: var(--accent); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 24px 20px; font-size: 15px; line-height: 1.625; color: var(--secondary); }

.download-section { background: var(--ink); padding: 56px 24px; text-align: center; }
@media (min-width: 768px) { .download-section { padding: 80px 24px; } }
.download-title { font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; color: var(--canvas); }
@media (min-width: 768px) { .download-title { font-size: 36px; } }
.download-subtitle { max-width: 448px; margin: 16px auto 0; font-size: 16px; color: var(--muted); }
.download-actions { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; margin-top: 32px; }
@media (min-width: 640px) { .download-actions { flex-direction: row; } }
.download-note { margin-top: 16px; font-size: 12px; color: var(--muted); }

.footer { border-top: 1px solid var(--border); background: var(--canvas); }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 48px 24px; display: flex; flex-direction: column; gap: 32px; }
@media (min-width: 768px) { .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; } }
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-logo { width: 28px; height: 28px; }
.footer-name { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.footer-tagline { font-size: 14px; color: var(--muted); margin-top: 2px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.footer-links a { font-size: 14px; color: var(--secondary); transition: color 0.2s; }
.footer-links a:hover { color: var(--ink); }
.footer-bottom { max-width: var(--max-width); margin: 0 auto; padding: 24px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; justify-content: space-between; font-size: 12px; color: var(--muted); }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; } }

@media (max-width: 1023px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: 24px; gap: 16px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
}

.fade-in { opacity: 0; transform: translateY(12px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }


/* Best Practices Page */
.bp-hero { max-width: var(--max-width); margin: 0 auto; padding: 128px 24px 64px; display: grid; gap: 40px; }
@media (min-width: 1024px) { .bp-hero { grid-template-columns: 0.95fr 1.05fr; align-items: end; } }
.bp-title { max-width: 620px; font-size: 40px; font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; color: var(--ink); }
@media (min-width: 768px) { .bp-title { font-size: 56px; } }
.bp-subtitle { max-width: 620px; margin-top: 24px; font-size: 16px; line-height: 1.625; color: var(--secondary); }
@media (min-width: 768px) { .bp-subtitle { font-size: 18px; } }

.bp-template { border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: 0 18px 50px rgba(15,23,42,0.06); }
.bp-template-header { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.bp-template-icon { width: 16px; height: 16px; color: var(--accent); }
.bp-template-title { font-weight: 600; }
.bp-template-body { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; font-size: 14px; line-height: 1.625; }
.bp-tpl-label { font-weight: 600; color: var(--ink); }
.bp-tpl-text { color: var(--secondary); }

.bp-cards { display: grid; gap: 16px; }
@media (min-width: 768px) { .bp-cards { grid-template-columns: repeat(2, 1fr); } }
.bp-card { padding: 24px; }
.bp-card-icon { width: 24px; height: 24px; color: var(--accent); margin-bottom: 20px; }
.bp-card-title { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.bp-card-desc { font-size: 14px; line-height: 1.625; color: var(--secondary); }
.bp-card-note { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; font-size: 14px; line-height: 1.625; color: var(--ink); }

.bp-avoid { margin: 40px auto 0; border: 1px dashed var(--border); background: var(--canvas); border-radius: var(--radius); padding: 24px; }
.bp-avoid-header { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.bp-avoid-icon { width: 16px; height: 16px; color: var(--accent); }
.bp-avoid-list { margin-top: 20px; display: grid; gap: 16px; }
@media (min-width: 640px) { .bp-avoid-list { grid-template-columns: repeat(3, 1fr); } }
.bp-avoid-item { display: flex; gap: 8px; font-size: 14px; line-height: 1.625; color: var(--secondary); }
.bp-avoid-dot { display: inline-block; width: 6px; height: 6px; flex-shrink: 0; margin-top: 7px; border-radius: 50%; background: var(--muted); }

/* Nav active state */
.nav-active { color: var(--ink) !important; font-weight: 500; }
