/* Tokens de marca — copiados de apps/ia/src/app/globals.css (fonte original
   Next.js) pra manter a mesma identidade visual: azul de marca, verde-limão
   só como acento de ação, tema sempre claro (decisão de produto, não segue
   o SO). */
:root {
  color-scheme: light;
  --background: #ffffff;
  --surface: #ffffff;
  --foreground: #262626;
  --muted: #5c5c5c;
  --border: rgba(38, 38, 38, 0.1);

  --brand: #0076a8;
  --brand-foreground: #ffffff;
  --brand-soft: #e5f3f8;

  --accent: #d6fa1e;
  --accent-foreground: #1a1a1a;

  --font-display: "Fraunces", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1024px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.font-display { font-family: var(--font-display); font-feature-settings: "opsz" 32; }

.wrap { max-width: var(--max-width); margin-inline: auto; padding-inline: 1.5rem; }

/* Header / navegação */
.site-header { border-bottom: 1px solid var(--border); }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1rem; }
.site-logo { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--brand); text-decoration: none; }
.primary-menu { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.primary-menu a { display: inline-block; padding: 0.5rem 0; font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: var(--brand); text-decoration: underline; text-underline-offset: 0.3rem; }
.menu-toggle { display: none; }
@media (max-width: 767px) {
  .site-header-inner { flex-wrap: wrap; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 0.5rem; background: none; border: 0; font-weight: 600; padding: 0.5rem 0; }
  .primary-menu { display: none; width: 100%; flex-direction: column; gap: 0; }
  .primary-menu.is-open { display: flex; }
  .primary-menu a { padding: 0.75rem 0; border-top: 1px solid var(--border); }
}

/* Botões */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 9999px; padding: 0.75rem 1.5rem; font-size: 0.875rem; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-foreground); transition: opacity 0.15s ease; }
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--foreground); border-color: var(--border); font-weight: 500; transition: background-color 0.15s ease; }
.btn-secondary:hover { background: var(--brand-soft); }

.badge-brand {
  display: inline-flex; align-items: center; border-radius: 9999px; background: var(--brand-soft);
  color: var(--brand); padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 600; width: fit-content;
}

/* Hero / seções genéricas */
.hero { border-bottom: 1px solid var(--border); text-align: center; padding-block: 3rem; }
.hero-inner { max-width: 640px; margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.15; margin: 0; }
.hero p { font-size: 1.125rem; color: var(--muted); margin: 0; max-width: 42rem; }
.eyebrow { font-size: 0.875rem; font-weight: 600; color: var(--brand); }

.section { padding-block: 3rem; }
.section-soft { background: var(--brand-soft); border-block: 1px solid var(--border); }
.section h2 { font-size: 1.875rem; margin-top: 0; }

.solution-paths { display: grid; gap: 2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 767px) { .solution-paths { grid-template-columns: 1fr; } }
.solution-path { display: flex; flex-direction: column; gap: 0.75rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }
.solution-path h2 { font-size: 1.25rem; margin: 0; }
.solution-path-text { font-weight: 500; margin: 0; }
.solution-path-detail { font-size: 0.9rem; color: var(--muted); margin: 0; }
.solution-path-link { margin-top: auto; padding-top: 0.75rem; width: fit-content; font-weight: 500; color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }

.comparison-table { list-style: none; margin: 0; padding: 0; }
.comparison-table li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 0; border-top: 1px solid var(--border); }
.comparison-table li:first-child { border-top: none; }

/* Artigos */
.article-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 767px) { .article-grid { grid-template-columns: 1fr; } }
.article-card { border-top: 1px solid var(--border); padding-top: 1rem; }
.article-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.article-card a { color: var(--brand); text-decoration: none; }
.article-card a:hover { text-decoration: underline; }
.article-card p { color: var(--muted); font-size: 0.9rem; margin: 0; }

.prose { max-width: 65ch; }
.prose h1, .prose h2, .prose h3 { font-family: var(--font-display); line-height: 1.25; }
.prose p, .prose li { line-height: 1.7; }

/* Ferramentas */
.tools-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tool-card { display: block; border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.25rem; text-decoration: none; color: inherit; transition: border-color 0.15s ease; }
.tool-card:hover { border-color: var(--brand); }
.tool-card h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.tool-card p { margin: 0; font-size: 0.85rem; color: var(--muted); }

/* Diagnóstico (widget do plugin) */
.semfio-diagnostico { max-width: 40rem; }
.semfio-field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.semfio-field label { font-size: 0.85rem; font-weight: 600; }
.semfio-field input, .semfio-diag-reply-form textarea {
  padding: 0.65rem 0.85rem; border-radius: 0.5rem; border: 1px solid var(--border); font: inherit;
}
.semfio-diag-error { color: #b3261e; font-size: 0.85rem; }
.semfio-diag-messages { display: flex; flex-direction: column; gap: 0.75rem; max-height: 26rem; overflow-y: auto; margin-bottom: 1rem; padding-right: 0.25rem; }
.semfio-msg { padding: 0.65rem 0.9rem; border-radius: 0.75rem; max-width: 85%; font-size: 0.95rem; }
.semfio-msg-user { align-self: flex-end; background: var(--brand); color: var(--brand-foreground); }
.semfio-msg-assistant { align-self: flex-start; background: var(--brand-soft); }
.semfio-diag-reply-form { display: flex; gap: 0.5rem; align-items: flex-end; }
.semfio-diag-reply-form textarea { flex: 1; resize: vertical; }
.is-busy { opacity: 0.6; pointer-events: none; }
.semfio-diag-report-actions { margin-top: 1.5rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 3rem; padding-block: 2.5rem; color: var(--muted); font-size: 0.875rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--brand); }

.screen-reader-text { position: absolute; left: -9999px; }
