/* ===== Pentefino — Design System ===== */

/* --- CSS Custom Properties --- */
:root,
[data-theme="light"] {
  --bg: #FAF9F6;
  --bg-secondary: #F2F0EC;
  --bg-elevated: #ECEAE4;
  --text-primary: #1A1917;
  --text-secondary: #6B6860;
  --text-muted: #9C978E;
  --accent: #C1553B;
  --accent-hover: #A8472F;
  --accent-subtle: rgba(193, 85, 59, 0.08);
  --border: rgba(0, 0, 0, 0.06);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --font-heading: 'Crimson Pro', Georgia, serif;
  --font-body: 'Work Sans', system-ui, sans-serif;
  --max-width: 960px;
  --transition: 200ms ease;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #141311;
  --bg-secondary: #1C1B18;
  --bg-elevated: #24231F;
  --text-primary: #E8E4DC;
  --text-secondary: #8A8578;
  --text-muted: #5C584F;
  --accent: #D4714A;
  --accent-hover: #E07F56;
  --accent-subtle: rgba(212, 113, 74, 0.1);
  --border: rgba(255, 255, 255, 0.06);
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow-md: none;
  color-scheme: dark;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

p {
  max-width: 65ch;
  color: var(--text-secondary);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header --- */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

/* --- Theme Toggle --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.theme-toggle:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

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

/* --- Hero --- */
.hero {
  padding: 80px 0 64px;
}

.hero h1 {
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero .lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* --- Stats Bar --- */
.stats-bar {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  flex: 1;
  min-width: 140px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* --- Search Section --- */
.search-section {
  padding: 64px 0 80px;
}

.search-section h2 {
  margin-bottom: 8px;
}

.search-section .section-desc {
  margin-bottom: 32px;
  font-size: 0.9375rem;
}

.search-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.search-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-select {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  min-width: 180px;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B6860' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.search-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

/* --- Table scroll wrapper --- */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- Results --- */
.results-info {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  min-height: 20px;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  table-layout: fixed;
}

.results-table thead {
  position: sticky;
  top: 0;
  background: var(--bg);
}

.results-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.results-table th.align-right {
  text-align: right;
}

.results-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  max-width: 0;       /* enables overflow: hidden on table cells */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-table td.align-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.results-table tbody tr {
  transition: background var(--transition);
}

.results-table tbody tr:hover {
  background: var(--bg-secondary);
}

.cell-entity {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-object {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Contracts table: Procedimento | Adjudicante | Adjudicatário | Valor | Data | Ver */
.results-table--contracts th:nth-child(1) { width: 14%; }
.results-table--contracts th:nth-child(2) { width: 23%; }
.results-table--contracts th:nth-child(3) { width: 23%; }
.results-table--contracts th:nth-child(4) { width: 13%; }
.results-table--contracts th:nth-child(5) { width: 14%; }
.results-table--contracts th:nth-child(6) { width: 13%; }

/* Anomalies table: Score | Heurística | Entidade | Fornecedor | Valor | Actions */
.results-table--anomalies th:nth-child(1) { width:  7%; }
.results-table--anomalies th:nth-child(2) { width: 18%; }
.results-table--anomalies th:nth-child(3) { width: 22%; }
.results-table--anomalies th:nth-child(4) { width: 21%; }
.results-table--anomalies th:nth-child(5) { width: 16%; }
.results-table--anomalies th:nth-child(6) { width: 16%; }

.cell-heuristic {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-subtle);
  color: var(--accent);
  white-space: nowrap;
}

.cell-score {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.score-high { color: var(--accent); }
.score-mid { color: var(--text-secondary); }
.score-low { color: var(--text-muted); }

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pagination button {
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.pagination button:hover:not(:disabled) {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination .page-info {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 0 8px;
}

/* --- Empty / Loading States --- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.skeleton {
  background: var(--bg-secondary);
  border-radius: 4px;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.skeleton-row {
  display: grid;
  grid-template-columns: 1fr 2fr 2fr 1.5fr 80px 80px;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.skeleton-cell {
  height: 16px;
  background: var(--bg-secondary);
  border-radius: 4px;
  animation: shimmer 1.5s infinite;
}

/* --- Detail Button --- */
.btn-detail {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn-detail:hover {
  background: var(--accent-subtle);
  color: var(--accent);
  border-color: var(--accent);
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  transform: translateY(8px);
  transition: transform var(--transition);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1.125rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-loading {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
}

.detail-grid {
  display: grid;
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-value {
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.5;
  word-break: break-word;
}

.detail-value--accent {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

/* --- Footer --- */
.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer a {
  color: var(--text-secondary);
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-stale {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  background: #fff3cd;
  color: #7a5f00;
  margin-left: 5px;
  vertical-align: middle;
  letter-spacing: 0.2px;
}

[data-theme="dark"] .footer-stale {
  background: rgba(212, 160, 23, 0.18);
  color: #d4a017;
}

/* --- Nav --- */
.site-nav {
  display: flex;
  gap: 28px;
}

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.site-nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--accent);
}

/* --- Buttons (shared) --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: var(--accent);
  color: #FAF9F6;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: filter 200ms ease;
}

.btn-primary:hover {
  filter: brightness(1.08);
  text-decoration: none;
  color: #FAF9F6;
}

.btn-primary:active {
  filter: brightness(0.95);
  transform: translateY(1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
  text-decoration: none;
  color: var(--text-primary);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* --- Reports Hero --- */
.reports-hero {
  padding: 80px 0 72px;
}

.reports-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.reports-hero h1 {
  max-width: 700px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.reports-hero .lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 580px;
  margin-bottom: 36px;
}

.reports-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Audience --- */
.reports-audience {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.audience-item {
  padding: 0 40px;
  border-right: 1px solid var(--border);
}

.audience-item:first-child {
  padding-left: 0;
}

.audience-item:last-child {
  border-right: none;
  padding-right: 0;
}

.audience-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.audience-item p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* --- Contents --- */
.reports-contents {
  padding: 88px 0;
}

.reports-contents-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 88px;
  align-items: start;
}

.reports-contents-text h2 {
  margin-bottom: 16px;
}

.reports-contents-text > p {
  margin-bottom: 36px;
}

.contents-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contents-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.contents-list li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  position: relative;
  top: -2px;
}

/* Report card preview */
.report-card-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  position: sticky;
  top: 24px;
}

.report-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.preview-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.preview-score {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.preview-score-value {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
}

.preview-score-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-findings {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.preview-finding {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.finding-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.finding-dot--redacted {
  background: var(--text-muted);
  opacity: 0.5;
}

.redacted-text {
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.preview-footer {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.preview-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

/* --- Sample Investigations --- */
.reports-samples {
  padding: 88px 0;
  background: var(--bg-secondary);
}

.reports-samples h2 {
  margin-bottom: 8px;
}

.reports-samples .section-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 48px;
}

.samples-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sample-report {
  background: var(--bg);
  padding: 40px 44px;
  border-radius: 4px;
}

.sample-header {
  margin-bottom: 28px;
}

.sample-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.sample-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.sample-report h3 {
  color: var(--text-primary);
  font-size: 1.375rem;
  line-height: 1.25;
}

.sample-findings {
  display: flex;
  gap: 56px;
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.sample-stat-value {
  font-family: var(--font-heading);
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.sample-stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sample-excerpt {
  margin-bottom: 24px;
}

.sample-excerpt p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.sample-redacted {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.redacted-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.redacted-row:last-child {
  border-bottom: none;
}

.redacted-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.redacted-value {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: right;
}

/* --- Pricing --- */
.reports-pricing {
  padding: 88px 0;
}

.pricing-header {
  margin-bottom: 48px;
}

.pricing-header h2 {
  margin-bottom: 8px;
}

.pricing-header p {
  font-size: 0.9375rem;
}

.pricing-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 680px;
  margin-bottom: 36px;
}

.pricing-option {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.pricing-option--featured {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.pricing-option-badge {
  position: absolute;
  top: -13px;
  left: 24px;
  background: var(--accent);
  color: #FAF9F6;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pricing-option-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pricing-name {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.pricing-price {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-top: 4px;
}

.pricing-delivery {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pricing-features li::before {
  content: '—';
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.pricing-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 560px;
}

.pricing-note a {
  color: var(--text-secondary);
}

/* --- Order Form --- */
.reports-order {
  padding: 88px 0;
  border-top: 1px solid var(--border);
}

.order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 88px;
  align-items: start;
}

.order-intro h2 {
  margin-bottom: 16px;
}

.order-intro > p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.order-contact-alt {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.order-contact-alt p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 10px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B6860' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-group textarea {
  resize: vertical;
  min-height: 108px;
}

.form-success {
  display: none;
  padding: 20px 24px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 4px;
}

/* --- Metodologia --- */
.metodologia-main {
  padding-bottom: 0;
}

.metod-container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.metod-hero {
  padding: 80px 0 64px;
}

.metod-hero h1 {
  max-width: 680px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.metod-hero .lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 640px;
}

.metod-section {
  padding: 72px 0;
  border-top: 1px solid var(--border);
}

.metod-section--alt {
  background: var(--bg-secondary);
}

.metod-section-inner {
  max-width: 640px;
}

.metod-section-inner h2 {
  margin-bottom: 20px;
}

.metod-section-inner p {
  margin-bottom: 16px;
  font-size: 0.9375rem;
  line-height: 1.75;
}

.metod-section-inner p:last-child {
  margin-bottom: 0;
}

.metod-callout {
  margin-top: 28px;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--accent-subtle);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Heuristic items */
.heuristics-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 40px;
}

.heuristic-item {
  background: var(--bg);
  padding: 32px 36px;
  border-radius: 4px;
}

.heuristic-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.heuristic-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: -0.02em;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.heuristic-header h3 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.heuristic-slug {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.heuristic-bonus {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.heuristic-body p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
  max-width: 640px;
}

.heuristic-body p:last-of-type {
  margin-bottom: 16px;
}

.heuristic-threshold {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
}

.heuristic-threshold:last-child {
  border-bottom: 1px solid var(--border);
}

.threshold-label {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.6875rem;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 120px;
}

.threshold-value {
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Scoring */
.scoring-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}

.scoring-factor {
  background: var(--bg-secondary);
  padding: 24px 28px;
  border-radius: 4px;
}

.scoring-factor h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.scoring-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.scoring-table th {
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.scoring-table td {
  padding: 8px 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.4;
}

.scoring-table tr:last-child td {
  border-bottom: none;
}

/* Score scale */
.score-scale-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.score-bands {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.score-band {
  padding: 20px;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.band-range {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.score-band--low .band-range { color: var(--text-muted); }
.score-band--mid .band-range { color: var(--text-secondary); }
.score-band--high .band-range { color: var(--accent); }

.band-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.band-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Limitations */
.limitations-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 8px;
}

.limitation-item h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-family: var(--font-body);
  font-weight: 600;
}

.limitation-item p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Methodology CTA */
.metod-cta {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

/* --- Anomalias CTA --- */
.anomalias-cta {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.cta-text h3 {
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.cta-text p {
  font-size: 0.9375rem;
  line-height: 1.65;
  max-width: 560px;
}

/* Anomaly skeleton row variant */
.anomaly-skeleton-row {
  grid-template-columns: 56px 140px 1fr 1fr 100px 110px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.375rem; }

  /* Methodology responsive */
  .scoring-grid {
    grid-template-columns: 1fr;
  }

  .score-bands {
    grid-template-columns: 1fr;
  }

  .heuristic-item {
    padding: 24px 20px;
  }

  .heuristic-header {
    flex-wrap: wrap;
  }

  .heuristic-bonus {
    margin-left: 0;
  }

  /* Reports responsive */
  .audience-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .audience-item {
    padding: 24px 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .audience-item:first-child { padding-top: 0; }
  .audience-item:last-child { border-bottom: none; padding-bottom: 0; }

  .reports-contents-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .report-card-preview {
    position: static;
  }

  .sample-report {
    padding: 28px 24px;
  }

  .sample-findings {
    gap: 28px;
  }

  .pricing-options {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .order-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero { padding: 48px 0 40px; }

  .stats-grid {
    gap: 32px;
  }

  .stat {
    min-width: 120px;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .search-controls {
    flex-direction: column;
  }

  .search-select {
    min-width: 100%;
  }

  /* Table → stacked list on mobile */
  .results-table thead {
    display: none;
  }

  .results-table,
  .results-table tbody,
  .results-table tr,
  .results-table td {
    display: block;
  }

  .results-table tr {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
  }

  .results-table td {
    padding: 4px 0;
    border: none;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .results-table td.align-right {
    text-align: left;
  }

  .results-table td::before {
    content: attr(data-label);
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 8px;
    min-width: 80px;
  }

  .cell-entity {
    max-width: 100%;
    white-space: normal;
  }

  .skeleton-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  h1 { font-size: 1.75rem; }

  .stats-grid {
    gap: 24px;
  }

  .stat {
    min-width: 100px;
  }
}
