:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --border: #e2e8f0;
  --success: #16a34a;
  --error: #dc2626;
  --radius: 6px;
  --font-sys: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

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

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-bottom: 2rem;
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1.5rem;
}

.site-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.site-header .tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.site-header nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.9rem;
}

.site-header nav a:hover {
  color: var(--primary);
}

.workspace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.workspace-header {
  margin-bottom: 1.5rem;
}

.control-group {
  margin-top: 1rem;
}

.control-group select {
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sys);
}

.grid-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.query-panel textarea {
  width: 100%;
  height: 350px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  resize: vertical;
}

.query-panel label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.checklist h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.check-item input[type="checkbox"] {
  margin-top: 0.3rem;
  width: 1.1rem;
  height: 1.1rem;
}

.check-item label {
  font-size: 0.95rem;
}

.check-desc {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  margin: 1.5rem 0;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  background: var(--success);
  transition: width 0.3s ease;
}

.primary-btn, .secondary-btn {
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}

.primary-btn {
  background: var(--primary);
  color: white;
}

.primary-btn:hover {
  background: var(--primary-hover);
}

.secondary-btn {
  background: var(--border);
  color: var(--text);
}

.secondary-btn:hover {
  background: #cbd5e1;
}

.report-container {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.report-container textarea {
  width: 100%;
  height: 200px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}

.hidden {
  display: none;
}

.content-section {
  margin-bottom: 2.5rem;
}

.content-section h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.content-section h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
}

.content-section p {
  margin-bottom: 1rem;
  color: #334155;
}

.content-section code {
  font-family: var(--font-mono);
  background: var(--border);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  font-size: 0.9em;
}

.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 nav {
  margin-top: 0.5rem;
}

.site-footer nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 0.5rem;
}

@media print {
  .site-header, .query-panel, .content-section, .site-footer, button, select {
    display: none !important;
  }
  body {
    background: white;
  }
  .workspace {
    border: none;
  }
  .report-container {
    display: block !important;
    border: none;
  }
  .report-container textarea {
    height: auto;
    border: none;
  }
}


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