:root {
  --bg: #f7f8fa;
  --card: #ffffff;
  --ink: #1f2933;
  --muted: #6b7280;
  --border: #e5e7eb;

  /* Paleta de cores secundária da marca */
  --brand-100: #c3c8b4;
  --brand-300: #788858;
  --brand-500: #3d512c;
  --brand-700: #1e331d;
  --brand-900: #161617;

  --accent: var(--brand-700);
  font-family: "Red Hat Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body.embed { background: transparent; }

.site-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.site-header h1 { margin: 0; font-size: 20px; }

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
body.embed main { padding: 8px; }

.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(22, 22, 23, 0.04);
}
body.embed .chart-card { border: none; border-radius: 0; padding: 8px; box-shadow: none; }

.chart-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.chart-header h2 { margin: 0; font-size: 16px; }

.chart-filters { display: flex; gap: 8px; }

.filter-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.filter-btn.active {
  color: #fff;
  background: var(--accent);
}

.chart-canvas {
  position: relative;
  height: 360px;
}

.chart-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.chart-embed {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.chart-embed-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.chart-embed-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.chart-embed-code {
  flex: 1;
  resize: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.chart-embed-copy {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--ink);
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.chart-embed-copy:hover { border-color: var(--accent); color: var(--accent); }
