/* Master — análise comparativa (estático) */
:root {
  --bg: #f6f4f1;
  --surface: #fff;
  --text: #1a1a1a;
  --muted: #5c5c5c;
  --accent: #7a1f1f;
  --border: #e0dcd6;
  --tab-inactive: #ebe7e1;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  --font: "Source Serif 4", "Georgia", serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent);
}

.page {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.intro {
  margin-bottom: 2rem;
}

.intro h1 {
  font-family: var(--font);
  font-size: clamp(1.65rem, 4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: var(--accent);
}

.intro .lead {
  margin: 0;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 42em;
}

.intro .meta {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.tab {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--tab-inactive);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tab:hover {
  color: var(--text);
  background: #e3dfd8;
}

.tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border);
  border-bottom-color: var(--surface);
  margin-bottom: -1px;
  box-shadow: var(--shadow);
}

.tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tabpanel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 1.5rem 1.35rem 1.75rem;
  box-shadow: var(--shadow);
}

.tabpanel[hidden] {
  display: none !important;
}

.tabpanel:not([hidden]) {
  display: block;
}

.tabpanel h2 {
  font-family: var(--font);
  font-size: 1.35rem;
  margin: 0 0 1rem;
  color: var(--text);
}

.tabpanel section {
  margin-bottom: 1.25rem;
}

.tabpanel section:last-of-type {
  margin-bottom: 0;
}

.tabpanel h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.tabpanel p {
  margin: 0;
  font-size: 0.98rem;
}

.figure-wrap {
  margin-top: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #faf9f7;
}

.figure-wrap img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.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;
}

@media (max-width: 520px) {
  .tablist {
    flex-direction: column;
    border-bottom: none;
    padding-bottom: 0;
  }

  .tab {
    border-radius: var(--radius);
    width: 100%;
    text-align: left;
  }

  .tab[aria-selected="true"] {
    margin-bottom: 0;
    border-bottom-color: var(--border);
  }

  .tabpanel {
    border-radius: var(--radius);
  }
}
