:root {
  --bg: #0f1117;
  --bg-card: #181b25;
  --bg-surface: #1e2231;
  --bg-hover: #252a3a;
  --border: #2a2f40;
  --border-light: #353b4f;
  --text: #e2e4ed;
  --text-muted: #8b8fa3;
  --text-dim: #5c6078;
  --accent: #f59e0b;
  --accent-dim: #b87a09;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 8px;
  --radius-lg: 12px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, Consolas, monospace;
  --max-width: 1200px;
  --header-h: 60px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

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

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

img, svg { display: block; max-width: 100%; }

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

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.logo:hover { text-decoration: none; }
.logo-text { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.02em; }
.logo-accent { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 20px;
}
.site-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  padding: 80px 20px 64px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner { max-width: 680px; margin: 0 auto; }

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--accent);
  color: #1a1a1a;
  border-color: var(--accent);
}
.btn-primary:hover { background: #fbbf24; border-color: #fbbf24; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-light);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-muted); background: var(--bg-hover); }

/* Sections */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 20px;
}

h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

/* How it works */
.how-section {
  border-bottom: 1px solid var(--border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.15s;
}
.step-card:hover { border-color: var(--accent); }

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.step-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

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

/* Guide Section */
.guide-section {
  border-bottom: 1px solid var(--border);
  padding: 40px 20px;
}

.guide-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

/* Structure Picker */
.structure-picker {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.structure-picker h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.picker-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.picker-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.picker-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s;
}

.picker-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.picker-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.picker-icon { font-size: 1.1rem; flex-shrink: 0; }

/* Guide Content */
.guide-content {
  min-width: 0;
}

.guide-header {
  margin-bottom: 24px;
}

.guide-header h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.guide-summary {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
}

.tab {
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  margin-bottom: -1px;
}

.tab:hover { color: var(--text); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

.tab-panel h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.panel-content { color: var(--text); }

.panel-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-content li {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.6;
}

.panel-content li strong { color: var(--accent); }

.panel-content p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.panel-content p:last-child { margin-bottom: 0; }

/* Checklist */
.checklist-area ul { gap: 8px; }

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}

.checklist-item:hover { border-color: var(--border-light); }

.checklist-item.checked {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.06);
}

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

.checklist-item label {
  font-size: 0.9rem;
  line-height: 1.5;
  cursor: pointer;
  flex: 1;
}

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

/* Guide Actions */
.guide-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.save-status {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-left: auto;
}

/* Content Section */
.content-section {
  border-bottom: 1px solid var(--border);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

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

.content-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent);
}

.content-card p, .content-card li {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.content-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-card li::before {
  content: "\2022";
  color: var(--accent);
  margin-right: 8px;
}

/* FAQ */
.faq-section {
  border-bottom: 1px solid var(--border);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 800px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-q::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-q[aria-expanded="true"]::after {
  content: "\2212";
}

.faq-q:hover { background: var(--bg-hover); }

.faq-a {
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Footer */
.site-footer {
  padding: 40px 20px;
  background: var(--bg-card);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 4px;
}

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

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

.footer-note {
  width: 100%;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* Print */
@media print {
  .site-header, .site-footer, .hero, .how-section, .faq-section, .content-section, .guide-actions, .structure-picker { display: none !important; }
  body { background: #fff; color: #000; }
  .guide-section { padding: 0; border: none; }
  .guide-layout { display: block; }
  .tab-panel { display: block !important; margin-bottom: 24px; }
  .tabs { display: none; }
  .checklist-item { border: 1px solid #ccc; }
  h2, h3 { color: #000; }
  .panel-content li { border: 1px solid #ddd; }
}

/* Responsive */
@media (max-width: 768px) {
  .guide-layout { grid-template-columns: 1fr; }
  .structure-picker { position: static; }
  .picker-list { flex-direction: row; flex-wrap: wrap; }
  .picker-btn { flex: 1; min-width: 140px; justify-content: center; }
  .hero { padding: 48px 16px 40px; }
  .section-inner { padding: 40px 16px; }
  .guide-section { padding: 24px 16px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .picker-btn { min-width: 100%; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .guide-actions { flex-wrap: wrap; }
}



/* 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;
}
