:root{
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --surface: #F9FAFB;
  --border: #E5E7EB;
  --text-main: #111827;
  --text-muted: #6B7280;
  --bg-color: #FFFFFF;
  --radius: 8px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-family); color: var(--text-main); background-color: var(--surface); line-height: 1.6; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header { background: var(--bg-color); border-bottom: 1px solid var(--border); padding: 1rem 0; }
.nav-bar { display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; color: var(--primary); }
.main-nav a { margin-left: 1rem; color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color 0.15s; }
.main-nav a:hover { color: var(--primary); }

/* Hero */
.hero-section { padding: 4rem 0 2rem; text-align: center; background: var(--bg-color); }
.hero-section h1 { font-size: 2.5rem; letter-spacing: -0.025em; margin-bottom: 1rem; }
.lead { font-size: 1.125rem; color: var(--text-muted); max-width: 800px; margin: 0 auto; }

/* App Section */
.app-section { padding: 2rem 0; }
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media(max-width: 768px) { .app-grid { grid-template-columns: 1fr; } }
.input-pane, .output-pane { background: var(--bg-color); padding: 1.5rem; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,0,0,0.05); border: 1px solid var(--border); }
.input-pane h2, .output-pane h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.hint { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 1rem; }
textarea { width: 100%; height: 250px; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); font-family: monospace; font-size: 0.875rem; resize: vertical; margin-bottom: 1rem; }
textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.stats-bar { display: flex; gap: 1rem; margin-bottom: 1rem; font-size: 0.875rem; color: var(--text-muted); }
.stats-bar strong { color: var(--text-main); font-weight: 600; }

/* Buttons */
button { display: inline-block; padding: 0.75rem 1.5rem; border: none; border-radius: var(--radius); font-weight: 600; cursor: pointer; transition: background 0.15s; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; width: 100%; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: #f3f4f6; color: var(--text-main); }
.btn-secondary:hover:not(:disabled) { background: #e5e7eb; }
.action-buttons { display: flex; gap: 0.75rem; }
.action-buttons button { flex: 1; }

/* Info Sections */
.info-section, .faq-section { padding: 3rem 0; background: var(--bg-color); border-top: 1px solid var(--border); }
.info-section h2, .faq-section h2 { font-size: 1.875rem; margin-bottom: 1.5rem; }
.info-section h3 { font-size: 1.25rem; margin: 1.5rem 0 0.5rem; }
.info-section p, .info-section ul { margin-bottom: 1rem; color: var(--text-muted); }
.info-section ul { margin-left: 1.5rem; }
.faq-item { margin-bottom: 1.5rem; }
.faq-item h3 { font-size: 1.125rem; margin-bottom: 0.25rem; }
.faq-item p { color: var(--text-muted); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 2rem 0; text-align: center; color: var(--text-muted); font-size: 0.875rem; }
.footer-links { margin-top: 0.5rem; display: flex; justify-content: center; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }


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