:root {
  --pessoas-blue: #2C4391;
  --pessoas-red: #E32526;
  --pessoas-yellow: #F9B233;
  --pessoas-green: #3E8E41;
  --pessoas-gray: #586B81;

  --radius: 16px;
  --radius-sm: 10px;
  --font-family: 'Google Sans Flex', system-ui, sans-serif;
  --nav-height: 72px;
}

/* Títulos — Google Sans Flex com peso e opsz ajustados */
.view-header__title,
.about-hero__title,
.section__title,
.article-card__title {
  font-family: var(--font-family);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 32, 'wght' 600;
}

.stat-card__value,
.pipeline__count,
.source-pill__count {
  font-family: var(--font-family);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 36, 'wght' 700;
}

[data-theme="light"] {
  --bg: #f4f6fa;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fc;
  --bg-muted: #eef1f6;
  --border: rgba(44, 67, 145, 0.12);
  --text: #1a2744;
  --text-muted: #586B81;
  --accent: var(--pessoas-blue);
  --accent-dim: rgba(44, 67, 145, 0.08);
  --accent-hover: rgba(44, 67, 145, 0.14);
  --topbar-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 1px 3px rgba(44, 67, 145, 0.06), 0 4px 16px rgba(44, 67, 145, 0.04);
  --shadow-hover: 0 4px 20px rgba(44, 67, 145, 0.1);
  --track-bg: rgba(44, 67, 145, 0.08);
  --ambient-opacity: 0.5;
}

[data-theme="dark"] {
  --bg: #0a0e17;
  --bg-surface: #111827;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-muted: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --accent: #6b8fd4;
  --accent-dim: rgba(107, 143, 212, 0.15);
  --accent-hover: rgba(107, 143, 212, 0.25);
  --topbar-bg: rgba(10, 14, 23, 0.92);
  --shadow: none;
  --shadow-hover: none;
  --track-bg: rgba(255, 255, 255, 0.06);
  --ambient-opacity: 0.35;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: var(--ambient-opacity);
  transition: opacity 0.3s;
}

.ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: drift 20s ease-in-out infinite alternate;
}

.ambient__orb--1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(44, 67, 145, 0.25) 0%, transparent 70%);
  top: -180px; right: -80px;
}

.ambient__orb--2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(62, 142, 65, 0.2) 0%, transparent 70%);
  bottom: -120px; left: -80px;
  animation-delay: -8s;
}

.ambient__orb--3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(249, 178, 51, 0.15) 0%, transparent 70%);
  top: 50%; left: 40%;
  animation-delay: -14s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(20px, -15px) scale(1.04); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-ring {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.topbar__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
}

.logo__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--pessoas-blue);
  letter-spacing: -0.01em;
}

[data-theme="dark"] .logo__name { color: #8ba4e0; }

.logo__year {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pessoas-gray);
}

.topbar__center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 100px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
}

.nav-tab {
  padding: 8px 20px;
  border-radius: 100px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

a.nav-tab { display: inline-block; }

.nav-tab:hover { color: var(--text); }

.nav-tab.active {
  background: var(--bg-surface);
  color: var(--pessoas-blue);
  box-shadow: var(--shadow);
}

[data-theme="dark"] .nav-tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: none;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.badge-live {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.badge-live__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pessoas-green);
  animation: pulse-ring 2s ease infinite;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.theme-toggle:hover {
  color: var(--pessoas-blue);
  border-color: var(--pessoas-blue);
}

.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Views */
.view {
  display: none;
  padding: 48px 0 80px;
  animation: fadeIn 0.35s ease both;
}

.view.active { display: block; }

.view-header { margin-bottom: 36px; }

.view-header__title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--pessoas-blue);
  font-variation-settings: 'opsz' 48, 'wght' 700;
  letter-spacing: -0.03em;
}

[data-theme="dark"] .view-header__title { color: var(--text); }

/* About */
.about-hero {
  padding: 20px 0 16px;
  max-width: 780px;
}

.about-hero__title {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  font-variation-settings: 'opsz' 56, 'wght' 700;
  letter-spacing: -0.03em;
  color: var(--pessoas-blue);
  margin-bottom: 24px;
}

.about-hero__intro {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 740px;
}

.about-hero__intro + .about-hero__intro { margin-top: 10px; }

[data-theme="dark"] .about-hero__title { color: var(--text); }

.about-section { margin-top: 56px; }

.about-section > .section__title { margin-bottom: 12px; }

.about-section__intro,
.about-section__note {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.about-section__intro { max-width: 720px; }

.about-section__note { margin-top: 16px; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.about-block {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.about-block__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--pessoas-blue);
  margin-bottom: 12px;
}

[data-theme="dark"] .about-block__title { color: var(--accent); }

.about-block p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.about-block p + p { margin-top: 12px; }

.about-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.about-step { padding: 24px; }

.about-step__number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--pessoas-blue);
  font-size: 0.75rem;
  font-weight: 700;
}

[data-theme="dark"] .about-step__number { color: var(--accent); }

.about-relevance {
  position: relative;
  overflow: hidden;
}

.about-grid--relevance { grid-template-columns: repeat(3, 1fr); }

.about-relevance::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--relevance-color);
}

.about-list {
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

.about-list li + li { margin-top: 6px; }

.about-notice {
  padding: 28px 32px;
  border-left: 4px solid var(--pessoas-yellow);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.about-notice__title {
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 10px;
}

.about-notice p {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.about-notice p + p { margin-top: 8px; }

.about-faq {
  margin-top: 24px;
  border-top: 1px solid var(--border);
}

.about-faq details { border-bottom: 1px solid var(--border); }

.about-faq summary {
  padding: 20px 4px;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.about-faq details p {
  padding: 0 4px 20px;
  max-width: 760px;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.about-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
}

.about-meta__item {
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.about-meta__label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.about-meta__value { font-size: 0.875rem; font-weight: 500; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  padding: 24px 20px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stat-accent, var(--pessoas-blue));
}

.stat-card__value {
  font-size: 2.4rem;
  line-height: 1;
  color: var(--pessoas-blue);
}

.stat-card__value--theme {
  font-size: 1.35rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

[data-theme="dark"] .stat-card__value { color: var(--text); }

.stat-card__label {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card__detail {
  margin-top: 8px;
  font-size: 0.6875rem;
  color: var(--text-muted);
  opacity: 0.8;
}

.section { margin-bottom: 48px; }

.section__title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  font-variation-settings: 'opsz' 28, 'wght' 600;
}

.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: center;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.pipeline__stage { text-align: center; padding: 16px; }

.pipeline__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  font-size: 1.25rem;
}

.pipeline__count {
  font-size: 2rem;
  color: var(--pessoas-blue);
}

[data-theme="dark"] .pipeline__count { color: var(--text); }

.pipeline__label { font-size: 0.75rem; font-weight: 600; margin-top: 4px; }

.pipeline__sublabel {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.pipeline__arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
  opacity: 0.4;
}

.sentiment-comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.sentiment-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--relevance-color);
  box-shadow: var(--shadow);
}

.sentiment-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.sentiment-card__title {
  font-size: 1rem;
  font-variation-settings: 'opsz' 20, 'wght' 600;
}

.sentiment-card__total {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.sentiment-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}

.sentiment-count {
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  text-align: center;
}

.sentiment-count dt {
  font-size: 0.6875rem;
  font-weight: 600;
}

.sentiment-count dd {
  margin: 6px 0 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.sentiment-count--positive dd { color: var(--pessoas-green); }
.sentiment-count--neutral dd { color: var(--pessoas-blue); }
.sentiment-count--negative dd { color: var(--pessoas-red); }

.stats-breakdown {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.panel {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.panel__title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.theme-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.theme-bar__label {
  width: 240px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.theme-bar__track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--track-bg);
  overflow: hidden;
}

.theme-bar__fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--pessoas-blue), var(--pessoas-green));
}

.theme-bar__count {
  width: 20px;
  text-align: right;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}

.source-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  border: 1px solid var(--border);
}

.source-pill__name {
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: capitalize;
}

.source-pill__count {
  font-size: 1.4rem;
  color: var(--pessoas-blue);
}

[data-theme="dark"] .source-pill__count { color: var(--text); }

.entity-cloud { display: flex; flex-wrap: wrap; gap: 10px; }

.entity-chip {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: var(--shadow);
}

.entity-chip__type {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.entity-chip--lg { font-size: 0.9375rem; padding: 12px 20px; }
.entity-chip--md { font-size: 0.8125rem; }
.entity-chip--sm { font-size: 0.6875rem; padding: 8px 12px; opacity: 0.85; }

/* News */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  align-items: center;
}

.filter-select {
  min-width: 200px;
  padding: 11px 18px;
  padding-right: 36px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font-family);
  font-size: 0.8125rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%23586B81' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.filter-select:focus { border-color: var(--pessoas-blue); }

.filter-select.hidden { display: none; }

.filter-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.search-box {
  flex: 1;
  min-width: 200px;
  padding: 11px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font-family);
  font-size: 0.8125rem;
  outline: none;
}

.search-box:focus { border-color: var(--pessoas-blue); }
.search-box::placeholder { color: var(--text-muted); }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  align-content: start;
}

.articles-grid:not(.articles-grid--list) {
  align-items: stretch;
}

.articles-grid:not(.articles-grid--list) .article-card {
  height: 100%;
}

.articles-grid.hidden { display: none; }

.article-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.article-card:hover,
.article-card:focus-visible {
  background: var(--bg-card-hover);
  border-color: var(--pessoas-blue);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  outline: none;
}

.article-card.hidden { display: none; }

.article-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-card__source {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-card__date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.article-card__title {
  font-size: 1.15rem;
  line-height: 1.35;
  font-variation-settings: 'opsz' 18, 'wght' 600;
  letter-spacing: -0.01em;
}

.article-card__summary {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.tag {
  font-size: 0.625rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--accent-dim);
  color: var(--pessoas-blue);
}

[data-theme="dark"] .tag { color: var(--accent); }

.tag--relevance {
  background: color-mix(in srgb, var(--tag-color, var(--pessoas-blue)) 12%, transparent);
  color: var(--tag-color, var(--pessoas-blue));
}

.tag--primary {
  font-size: 0.75rem;
  padding: 5px 12px;
}

.tag--duplicates {
  background: color-mix(in srgb, var(--pessoas-gray) 14%, transparent);
  color: var(--pessoas-gray);
}

[data-theme="dark"] .tag--duplicates {
  color: var(--text-muted);
}

.detail-duplicates {
  margin-top: 20px;
}

.detail-duplicate-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.detail-duplicate-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-muted);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.detail-duplicate-link:hover,
.detail-duplicate-link:focus-visible {
  border-color: var(--pessoas-blue);
  background: var(--bg-card-hover);
  outline: none;
}

.detail-duplicate-link__source {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-duplicate-link__arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.topbar__inner--simple {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
}

.back-link {
  justify-self: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover { color: var(--pessoas-blue); }

.back-link--inline {
  display: inline-block;
  margin-top: 16px;
}

.container--article {
  max-width: 1200px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  margin-top: 28px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.article-back:hover { color: var(--pessoas-blue); }

.article-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0 64px;
  align-items: start;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-card .article-detail__header {
  padding: 0;
  border-bottom: none;
}

.detail-card--side {
  padding: 24px 28px;
}

.detail-card:not(.detail-card--side) {
  padding: 32px;
}

.detail-card .detail-source-link {
  margin-top: 4px;
}

.detail-card .detail-model {
  margin-top: auto;
  text-align: left;
}

.container--narrow {
  max-width: 760px;
}

.article-page {
  padding: 48px 0 64px;
}

.article-page-empty {
  padding: 80px 0;
  text-align: center;
  color: var(--text-muted);
}

.article-page-empty p {
  margin-top: 12px;
  font-size: 0.9375rem;
}

.article-detail--page .article-detail__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.article-detail__header {
  padding: 32px 32px 20px;
  border-bottom: 1px solid var(--border);
}

.article-detail__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.article-detail__date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.article-detail__title {
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 700;
  font-variation-settings: 'opsz' 24, 'wght' 700;
  letter-spacing: -0.02em;
  color: var(--pessoas-blue);
}

[data-theme="dark"] .article-detail__title { color: var(--text); }

.article-detail__author {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.article-detail__body {
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-relevance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.detail-relevance__badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  background: color-mix(in srgb, var(--level-color) 12%, transparent);
  color: var(--level-color);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-relevance__score {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.detail-meta-block__title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.detail-summary,
.detail-reason {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-entity-list {
  list-style: none;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.detail-entity-list li::before {
  content: '·';
  margin-right: 8px;
  color: var(--pessoas-blue);
}

.detail-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 0.8125rem;
}

.detail-dl dt {
  color: var(--text-muted);
  font-weight: 500;
}

.detail-dl dd {
  color: var(--text);
}

.article-detail__footer {
  padding: 20px 32px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-source-link {
  display: block;
  text-align: center;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  background: var(--pessoas-blue);
  color: #fff;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: opacity 0.2s;
}

.detail-source-link:hover { opacity: 0.9; }

[data-theme="dark"] .detail-source-link {
  background: var(--accent);
}

.detail-model {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
}

.pipeline--3 {
  grid-template-columns: repeat(3, 1fr);
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.results-count {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
  padding-left: 2px;
}

.results-area {
  position: relative;
  min-height: 28rem;
}

.results-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.results-empty__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}

.results-empty__icon {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--text-muted);
  opacity: 0.4;
}

.results-empty__text {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.results-empty.hidden { display: none; }

.layout-toggle.hidden { display: none; }

.layout-toggle {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.layout-toggle__btn {
  width: 34px;
  height: 26px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
}

.layout-toggle__btn svg {
  width: 16px;
  height: 16px;
}

.layout-toggle__btn:hover {
  color: var(--pessoas-blue);
}

.layout-toggle__btn.active {
  background: var(--accent-dim);
  color: var(--pessoas-blue);
}

[data-theme="dark"] .layout-toggle__btn.active {
  color: var(--accent);
}

.articles-grid--list {
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}

.articles-grid--list .article-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 4px;
  padding: 8px 14px;
  min-width: 0;
  min-height: 0;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
}

.articles-grid--list .article-card:last-child {
  border-bottom: none;
}

.articles-grid--list .article-card:hover,
.articles-grid--list .article-card:focus-visible {
  transform: none;
  box-shadow: none;
  background: var(--bg-card-hover);
  border-color: var(--border);
}

.articles-grid--list .article-card__top {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: auto;
  min-width: 0;
}

.articles-grid--list .article-card__source {
  font-size: 0.625rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.articles-grid--list .article-card__date {
  font-size: 0.6875rem;
  line-height: 1.2;
}

.articles-grid--list .article-card__title {
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.35;
  font-variation-settings: 'opsz' 14, 'wght' 600;
  overflow-wrap: break-word;
}

.articles-grid--list .article-card__footer {
  margin-top: 0;
  padding-top: 0;
}

.articles-grid--list .tag {
  font-size: 0.5625rem;
  padding: 2px 6px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination.hidden { display: none; }

.pagination__btn,
.pagination__page {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: grid;
  place-items: center;
}

.pagination__btn:hover:not(:disabled),
.pagination__page:hover:not(.active) {
  border-color: var(--pessoas-blue);
  color: var(--pessoas-blue);
}

.pagination__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination__page.active {
  background: var(--pessoas-blue);
  border-color: var(--pessoas-blue);
  color: #fff;
}

.pagination__ellipsis {
  min-width: 24px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  user-select: none;
}

[data-theme="dark"] .pagination__page.active {
  background: var(--accent);
  border-color: var(--accent);
}

.pagination__info {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}

footer {
  padding: 32px 48px 48px;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p { font-size: 0.75rem; color: var(--text-muted); }

.footer__dot {
  margin: 0 0.75em;
  opacity: 0.45;
}

.loading {
  display: grid;
  place-items: center;
  min-height: 60vh;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.loading__spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  border-top-color: var(--pessoas-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1024px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .sentiment-comparison { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-grid--relevance { grid-template-columns: repeat(3, 1fr); }
  .about-steps { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: 1fr; gap: 8px; }
  .pipeline--3 { grid-template-columns: 1fr; }
  .pipeline__arrow { transform: rotate(90deg); text-align: center; }
  .about-meta { grid-template-columns: 1fr; }
  .article-page-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .topbar__inner { gap: 10px; }
  .topbar__inner--simple { grid-template-columns: auto auto; }
  .back-link { display: none; }
  .logo__text { display: none; }
  .badge-live { display: none; }
  .nav-tab { padding: 8px 14px; font-size: 0.75rem; }
  .about-grid--relevance { grid-template-columns: 1fr; }
  .about-steps { grid-template-columns: 1fr; }
  .detail-card,
  .detail-card--side {
    padding: 20px;
  }
}

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .articles-grid--list .article-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }
  .articles-grid--list .article-card__footer {
    grid-column: 2;
  }
  .view { padding: 32px 0 64px; }
  .theme-bar__label { width: 110px; }
}
