:root {
  --bg: #FFF8F3;
  --bg-card: #FFFFFF;
  --text: #1A1A1A;
  --accent: #F97316;
  --accent-light: rgba(249, 115, 22, 0.08);
  --muted: #9CA3AF;
  --border: #F0E8E0;
  --max-width: 720px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Helvetica Neue", Arial, "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }

/* ── PROGRESS BAR ── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 56px;
  background: rgba(255, 248, 243, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav-logo span { color: var(--accent); }

.nav-toc {
  display: flex;
  gap: 2px;
  list-style: none;
}

.nav-toc a {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 7px;
  border-radius: 4px;
  transition: color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.nav-toc a:hover { color: var(--accent); }

@media (max-width: 768px) { .nav-toc { display: none; } }

/* ── MAIN ── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── HERO ── */
.hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 36px;
}

.hero-body {
  font-size: 17px;
  line-height: 1.9;
  color: #333;
}

.hero-body p { margin-bottom: 18px; }
.hero-body p:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
  .hero { padding: 48px 0 48px; }
  .hero h1 { font-size: 27px; }
  .hero-sub { font-size: 15px; }
  .hero-body { font-size: 15px; }
}

/* ── TOC ── */
.toc {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.toc-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

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

.toc-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.15s, color 0.15s;
}

.toc-list li a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.toc-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  min-width: 22px;
  flex-shrink: 0;
}

/* ── CHAPTER ── */
.chapter {
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 600px) { .chapter { padding: 48px 0; } }

.chapter-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.chapter h2 {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

@media (max-width: 600px) { .chapter h2 { font-size: 21px; } }

.chapter-body {
  font-size: 15px;
  line-height: 1.9;
  color: #333;
  margin-bottom: 32px;
}

.chapter-body p { margin-bottom: 14px; }
.chapter-body p:last-child { margin-bottom: 0; }

/* ── TOOLS GRID ── */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 32px 0;
}

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

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.tool-card-type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.tool-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.tool-tagline {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}

.tool-card p {
  font-size: 13px;
  color: #555;
  line-height: 1.65;
}

/* ── STEPS ── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0;
}

.step {
  display: flex;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  align-items: flex-start;
}

.step-num {
  width: 26px;
  height: 26px;
  min-width: 26px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.step-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-content p {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

/* ── PROMPT BLOCK ── */
.prompt-wrap { margin: 24px 0; }

.prompt-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.prompt-block {
  background: #1E1E1E;
  border-radius: 10px;
  padding: 20px 24px;
  overflow-x: auto;
}

.prompt-block pre {
  color: #D4D4D4;
  font-size: 13px;
  line-height: 1.8;
  font-family: "SF Mono", "Fira Code", Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.hl { color: #F97316; font-weight: 600; }

/* ── CALLOUT ── */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 28px 0;
  font-size: 14px;
  line-height: 1.8;
  color: #333;
}

/* ── TABLE ── */
.table-wrap {
  margin: 20px 0;
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-card);
}

.compare-table thead th {
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
}

.compare-table tbody td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
}

.badge-green { background: #D1FAE5; color: #065F46; }
.badge-gray  { background: #F3F4F6; color: #374151; }
.badge-orange{ background: #FEF3C7; color: #92400E; }

/* ── CHEATSHEET ── */
.cheat-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.cheat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}

.cheat-item h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.cheat-item p {
  font-size: 13px;
  color: #444;
  line-height: 1.7;
  font-family: "SF Mono", "Fira Code", Menlo, Consolas, monospace;
}

/* ── FOOTER CTA ── */
.footer-cta {
  padding: 80px 0 72px;
  text-align: center;
}

.footer-cta h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.3;
}

.footer-cta .footer-body {
  font-size: 16px;
  color: #555;
  max-width: 480px;
  margin: 0 auto 0;
  line-height: 1.85;
}

.footer-body p { margin-bottom: 10px; }

.footer-divider {
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin: 40px auto;
  border-radius: 2px;
}

.footer-author {
  font-size: 14px;
  color: var(--muted);
  line-height: 2;
}

.footer-author strong { color: var(--text); }
.footer-author a { color: var(--accent); }
