/* ==========================================================================
   BASE — tokens de design, reset e tipografia
   Identidade visual Revista Negócios: vermelho e branco
   ========================================================================== */

:root {
  /* Marca */
  --c-brand: #c10303;
  --c-brand-dark: #8f0202;
  --c-brand-soft: #fdeaea;
  --c-true: #c10303;
  --c-true-soft: #fdeaea;
  --c-false: #c10303;
  --c-false-soft: #fdeaea;
  --c-accent: #c10303;

  /* Neutros */
  --c-ink: #1c1c1c;
  --c-text: #333333;
  --c-muted: #6b6b6b;
  --c-line: #e6e1e1;
  --c-bg: #ffffff;
  --c-bg-soft: #f8f5f5;
  --c-paper: #ffffff;
  --c-bg-dark: #a00202;
  --c-on-dark: #ffffff;

  /* Cores por editoria */
  --cat-economia: #c10303;
  --cat-empresas: #8f0202;
  --cat-banca: #d64545;
  --cat-energia: #a3122a;
  --cat-sociedade: #b3261e;
        --cat-cultura: #e03131;

  /* Tipografia */
  --f-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --f-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container: 1240px;
  --gutter: 16px;
  --gap: 24px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(40, 10, 10, .06), 0 6px 22px rgba(40, 10, 10, .08);
  --header-h: 56px;
  --bottom-nav-h: 0px;
}

:root[data-theme="dark"] {
  --c-brand: #ff5c5c;
  --c-brand-dark: #ff8a8a;
  --c-brand-soft: #3d1515;
  --c-true: #ff5c5c;
  --c-true-soft: #3d1515;
  --c-false: #ff5c5c;
  --c-false-soft: #3d1515;
  --c-ink: #f5f2f2;
  --c-text: #dcd6d6;
  --c-muted: #a89f9f;
  --c-line: #3a2c2c;
  --c-bg: #171212;
  --c-bg-soft: #1f1818;
  --c-paper: #171212;
  --c-bg-dark: #5c0101;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 22px rgba(0, 0, 0, .35);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: var(--bottom-nav-h);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; color: var(--c-ink); font-family: var(--f-serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }

:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 8px; top: -40px; z-index: 1000;
  background: var(--c-brand); color: #fff; padding: 8px 12px; border-radius: var(--radius);
}
.skip-link:focus { top: 8px; }

/* Ligações dentro de descrições e textos (suporte a links) */
.rich a {
  color: var(--c-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
  position: relative; z-index: 2; /* clicável mesmo dentro de cartões */
}
.rich a:hover { color: var(--c-brand-dark); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
[hidden] { display: none !important; }
