:root {
  --bg: #0f1117;
  --bg-card: #181b24;
  --bg-elevated: #1e2231;
  --bg-input: #252a3a;
  --border: #2a2f40;
  --border-light: #353b4f;
  --text: #e2e5f1;
  --text-muted: #8b91a8;
  --text-dim: #5c6280;
  --accent: #7c6cf0;
  --accent-light: #9b8eff;
  --accent-bg: rgba(124,108,240,0.12);
  --green: #34d399;
  --green-bg: rgba(52,211,153,0.1);
  --red: #f87171;
  --red-bg: rgba(248,113,113,0.1);
  --yellow: #fbbf24;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 16px rgba(0,0,0,0.3);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,17,23,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-icon { color: var(--accent); }
.logo-accent { color: var(--accent-light); }

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav a {
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--bg-elevated);
  text-decoration: none;
}

/* Hero */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent-light);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 24px;
}

.stat {
  text-align: center;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 100px;
}

.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-light);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  gap: 6px;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #6a5ce0; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-full { width: 100%; }
.btn-danger-text { color: var(--red); }
.btn-danger-text:hover { background: var(--red-bg); }

/* Sections */
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.section-header {
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
}

/* Preset bar */
.preset-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.preset-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Checklist layout */
.checklist-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}

.checklist-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.group-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-icon { font-size: 1.2rem; }

.checklist-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.9rem;
  line-height: 1.4;
}

.check-item:hover { background: var(--bg-elevated); }

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}

.check-item.checked span {
  text-decoration: line-through;
  color: var(--text-dim);
}

/* Sidebar */
.checklist-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 80px;
}

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

.sidebar-card h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.sidebar-card .btn { margin-bottom: 8px; }
.sidebar-card .btn:last-child { margin-bottom: 0; }

.sidebar-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Progress ring */
.progress-ring {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-bg {
  fill: none;
  stroke: var(--bg-input);
  stroke-width: 8;
}

.progress-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 0.4s ease;
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-light);
}

/* Group progress */
.group-progress {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-progress li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.gp-name {
  width: 60px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.gp-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.gp-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.gp-pct {
  width: 32px;
  text-align: right;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* Prompts section */
.prompt-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.prompt-tab {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.prompt-tab:hover { background: var(--bg-elevated); color: var(--text); }
.prompt-tab.active {
  background: var(--accent-bg);
  color: var(--accent-light);
  border-color: var(--accent);
}

.prompt-panel { display: none; }
.prompt-panel.active { display: block; }

.prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
  position: relative;
}

.prompt-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.prompt-card pre {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-input);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  max-height: 160px;
  overflow-y: auto;
}

.prompt-card .copy-btn {
  position: absolute;
  top: 16px;
  right: 16px;
}

/* Troubleshooting */
.troubleshoot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

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

.troubleshoot-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--yellow);
}

.troubleshoot-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Quick start */
.quick-start-print {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.quick-start-print h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.quick-start-print ol {
  padding-left: 20px;
  margin-bottom: 20px;
}

.quick-start-print li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.print-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Why section */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.why-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.why-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 40px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}

.footer-brand p {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 8px;
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-copy {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 1000;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Print */
@media print {
  .site-header, .site-footer, .preset-bar, .checklist-sidebar, .hero-actions, .hero-stats, .prompt-tabs, .copy-btn, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .checklist-group, .prompt-card, .troubleshoot-card, .why-card, .quick-start-print { border: 1px solid #ccc; background: #fff; }
  .check-item.checked span { text-decoration: line-through; color: #888; }
  section { padding: 16px 0; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 24px 40px;
  }
  .hero-stats { justify-content: flex-start; }
  .checklist-layout { grid-template-columns: 1fr; }
  .checklist-sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .header-inner { padding: 0 16px; }
  .site-nav { gap: 2px; }
  .site-nav a { padding: 4px 8px; font-size: 0.8rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero-stats { flex-direction: row; gap: 12px; }
  .stat { padding: 12px 16px; min-width: 80px; }
  .stat-num { font-size: 1.4rem; }
  section { padding: 0 16px 48px; }
  .preset-bar { padding: 10px 12px; }
  .checklist-group { padding: 16px; }
  .troubleshoot-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
