:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --border: #334155;
  --font: system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  margin-bottom: 2rem;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-weight: 700;
  font-size: 1.25rem;
}
.logo span { color: var(--primary); }
nav a { color: var(--text-muted); text-decoration: none; margin-left: 1rem; }
nav a:hover { color: var(--text); }

.app-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.controls-panel {
  padding: 1.5rem;
  border-right: 1px solid var(--border);
  background: #151e2f;
}
.controls-panel h2 { font-size: 1.1rem; margin-bottom: 1.5rem; }
.control-group {
  margin-bottom: 1.25rem;
}
.control-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}
.control-group label span { color: var(--text); font-weight: 600; }
input[type="range"], select {
  width: 100%;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
}
.warn { color: #f59e0b; font-size: 0.8rem; display: block; margin-top: 5px; }
.btn {
  width: 100%; padding: 0.5rem; background: var(--primary); color: #fff;
  border: none; border-radius: 4px; cursor: pointer; font-weight: 600;
}
.btn:hover { opacity: 0.9; }
.preset-list {
  margin-top: 1rem; list-style: none; font-size: 0.85rem;
}
.preset-list li {
  padding: 0.5rem;
  background: var(--bg);
  margin-bottom: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex; justify-content: space-between;
}

.visual-panel {
  display: flex;
  flex-direction: column;
}
.stats-bar {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  background: #0f172a;
  border-bottom: 1px solid var(--border);
}
.stat { font-size: 0.85rem; color: var(--text-muted); }
.stat strong { color: var(--primary); font-size: 1.1rem; display: block; }

.svg-container { flex: 1; padding: 1.5rem; min-height: 300px; display: flex; align-items: center; justify-content: center; }
.svg-container svg { width: 100%; height: auto; }

.text-content {
  margin-top: 3rem;
  max-width: 800px;
}
.text-content h2 { margin-bottom: 1rem; color: #fff; }
.text-content h3 { margin: 1.5rem 0 0.5rem; color: #fff; font-size: 1.1rem; }
.text-content p { color: var(--text-muted); margin-bottom: 1rem; }
.text-content ul { color: var(--text-muted); margin-left: 1.5rem; margin-bottom: 1rem; }
.text-content li { margin-bottom: 0.5rem; }

.qa { margin-bottom: 1.5rem; }
.qa h4 { color: #fff; margin-bottom: 0.5rem; }

.site-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--text-muted); }

@media (max-width: 768px) {
  .app-grid { grid-template-columns: 1fr; }
  .controls-panel { border-right: none; border-bottom: 1px solid var(--border); }
  .stats-bar { 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;
}
