:root {
    --bg-color: #faf9f6;
    --surface-color: #ffffff;
    --text-main: #2d3748;
    --text-muted: #718096;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --border-color: #e2e8f0;
    --radius: 8px;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, 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-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1a202c;
}

a {
    color: var(--primary);
    text-decoration: none;
}

.site-header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    gap: 0.5rem;
    color: var(--text-main);
}

.site-header nav a {
    margin-left: 1.5rem;
    color: var(--text-muted);
    font-weight: 500;
}

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

.hero {
    padding: 4rem 0 3rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero .lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 2rem;
}

.builder-section {
    padding: 2rem 0 5rem;
}

.builder-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

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

.form-panel, .output-panel {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.form-panel h3 {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 1.1rem;
}

.instructions {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

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

input[type="text"], textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg-color);
    transition: border-color 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    width: 100%;
    margin-top: 1rem;
}

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

.btn-secondary {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

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

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.output-container {
    background: #1e1e1e;
    border-radius: var(--radius);
    overflow: hidden;
}

.markdown-display {
    font-family: var(--font-mono);
    color: #d4d4d4;
    padding: 1.5rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9rem;
    line-height: 1.5;
    min-height: 400px;
}

.guide-section {
    background: #ffffff;
    padding: 5rem 0;
    border-top: 1px solid var(--border-color);
}

.guide-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.guide-card {
    padding: 2rem;
    background: var(--bg-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.guide-card h3 {
    color: var(--primary);
    font-size: 1.25rem;
}

.site-footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    background: var(--surface-color);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-muted);
}

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


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