:root {
  --c-bg: #fdfbf7;
  --c-surface: #ffffff;
  --c-border: #e2ddd6;
  --c-text: #2c241b;
  --c-text-light: #6b5e52;
  --c-accent: #c47a3a;
  --c-accent-hover: #a86528;
  --c-accent-light: #f5e6d3;
  --c-success: #3a7d44;
  --c-danger: #b93a3a;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

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

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

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-text);
  text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--c-text); }
.site-nav {
  display: flex;
  gap: 16px;
}
.site-nav a {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--c-text-light);
}
.site-nav a:hover { color: var(--c-accent); }

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}
.btn-primary:hover {
  background: var(--c-accent-hover);
  border-color: var(--c-accent-hover);
  color: #fff;
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--c-accent);
  border-color: var(--c-accent);
}
.btn-ghost:hover {
  background: var(--c-accent-light);
  text-decoration: none;
}
.btn-danger-ghost {
  background: transparent;
  color: var(--c-danger);
  border-color: var(--c-danger);
}
.btn-danger-ghost:hover {
  background: #fceaea;
  text-decoration: none;
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* Intro */
.section-intro {
  padding: 60px 0 40px;
  text-align: center;
}
.section-intro h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 12px;
}
.lead {
  font-size: 1.1rem;
  color: var(--c-text-light);
  max-width: 600px;
  margin: 0 auto 24px;
}
.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
section {
  padding: 40px 0;
}
section h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.section-desc {
  color: var(--c-text-light);
  margin-bottom: 24px;
}

/* Form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-weight: 600;
  font-size: 0.9rem;
}
.field input,
.field textarea {
  padding: 10px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--c-surface);
  color: var(--c-text);
}
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--c-accent);
  outline-offset: 0;
}
.form-actions {
  flex-direction: row !important;
  gap: 10px;
  padding-top: 8px;
}

/* Results */
.results {
  margin-top: 32px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.results-actions { display: flex; gap: 8px; }
.results-body h4 {
  font-size: 1rem;
  margin: 16px 0 6px;
  color: var(--c-accent);
}
.results-body h4:first-child { margin-top: 0; }
.results-body p, .results-body li {
  font-size: 0.95rem;
  color: var(--c-text-light);
}
.results-body ul, .results-body ol {
  padding-left: 20px;
  margin-bottom: 8px;
}
.results-body li { margin-bottom: 4px; }

/* Guide */
.section-guide {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.guide-card {
  padding: 20px;
  background: var(--c-bg);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
}
.guide-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.guide-card p {
  font-size: 0.95rem;
  color: var(--c-text-light);
}
.guide-examples, .guide-tips {
  margin-bottom: 24px;
}
.guide-examples h3, .guide-tips h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}
.guide-examples ul, .guide-tips ol {
  padding-left: 20px;
}
.guide-examples li, .guide-tips li {
  font-size: 0.95rem;
  color: var(--c-text-light);
  margin-bottom: 6px;
}

/* History */
.history-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.history-item h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.history-item time {
  font-size: 0.8rem;
  color: var(--c-text-light);
}
.history-item p {
  font-size: 0.9rem;
  color: var(--c-text-light);
  margin-top: 4px;
}

/* FAQ */
.section-faq details {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.section-faq summary {
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}
.section-faq details p {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--c-text-light);
}

/* Footer */
.site-footer {
  padding: 24px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--c-text-light);
}
.site-footer a { color: var(--c-text-light); }
.site-footer a:hover { color: var(--c-accent); }

/* Print */
@media print {
  .site-header, .site-footer, .btn, .results-actions, .form-actions, .section-intro, .section-guide, .section-history, .section-faq { display: none !important; }
  .results { box-shadow: none; border: none; padding: 0; }
  body { background: #fff; }
}

/* Responsive */
@media (min-width: 540px) {
  .guide-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 539px) {
  .form-grid { grid-template-columns: 1fr; }
  .section-intro h1 { font-size: 1.6rem; }
  .site-nav { gap: 10px; }
  .site-nav a { font-size: 0.82rem; }
  .form-actions { flex-direction: column; }
  .results-header { flex-direction: column; align-items: flex-start; }
}



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