/* IA Hub Brasil — Accessible & Responsive Stylesheet (WCAG 2.1 AA / WCAG 2.2) */

:root {
  --navy: #09192d;
  --ink: #13253d;
  --muted: #53657a;
  --cyan: #72eddf;
  --blue: #155cbd;
  --blue-hover: #0f4694;
  --line: #dbe3ed;
  --paper: #f5f8fc;
  --white: #ffffff;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  color-scheme: light;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font: 1rem/1.7 var(--sans);
}

a {
  color: inherit;
}

button, input, select, summary {
  font: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Accessibility Focus Rings (WCAG 2.4.7 / WCAG 2.4.11 / WCAG 2.4.13) */
:focus-visible {
  outline: 3px solid #126bc8;
  outline-offset: 4px;
  border-radius: 4px;
}

.hero :focus-visible,
.site-footer :focus-visible,
.next-panel :focus-visible {
  outline-color: var(--cyan);
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(1240px, calc(100% - 64px));
  margin: auto;
}

/* Skip to Content Link for Keyboard & Screen Reader Users */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  background: var(--navy);
  color: var(--cyan);
  border: 2px solid var(--cyan);
  padding: 12px 20px;
  font-weight: 700;
  border-radius: 8px;
  z-index: 9999;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.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:focus {
  transform: translateY(0);
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

/* Header & Main Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  white-space: nowrap;
  font-size: 1.18rem;
  font-weight: 750;
  letter-spacing: -.04em;
  text-decoration: none;
  border-radius: 8px;
  padding: 4px 6px;
}

.brand strong {
  font-weight: 400;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.brand-mark img {
  width: 42px;
  height: 42px;
  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.main-nav a:hover,
.main-nav a[aria-current] {
  color: var(--blue);
}

.main-nav a[aria-current] {
  box-shadow: 0 2px 0 var(--blue);
  font-weight: 700;
}

.menu-toggle {
  display: none;
  border: 1.5px solid var(--line);
  padding: 10px 18px;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  touch-action: manipulation;
}

.menu-toggle:hover {
  background: var(--paper);
  border-color: var(--blue);
}

/* Hero Section */
.hero {
  color: white;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}

.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 85% 20%, #153e55 0, transparent 55%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 76px;
  align-items: center;
  padding: 64px 0;
}

.eyebrow {
  display: block;
  font-size: 0.75rem;
  line-height: 1.5;
  font-weight: 750;
  letter-spacing: .11em;
  color: var(--blue);
  margin: 0 0 14px;
}

.hero .eyebrow {
  color: var(--cyan);
}

h1, h2, h3 {
  line-height: 1.17;
  letter-spacing: -.04em;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(2.35rem, 4.3vw, 3.8rem);
  font-weight: 750;
}

.hero h1 span {
  color: var(--cyan);
}

h2 {
  font-size: clamp(1.75rem, 2.6vw, 2.35rem);
  font-weight: 720;
}

h3 {
  font-size: 1.25rem;
  font-weight: 720;
}

p {
  margin: 0 0 18px;
}

.hero p:not(.eyebrow) {
  color: #bccbdd;
  max-width: 580px;
  font-size: 1.08rem;
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  min-height: 48px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: filter 0.15s ease, background-color 0.15s ease;
}

.primary {
  background: var(--cyan);
  color: var(--navy);
}

.primary:hover {
  filter: brightness(0.92);
}

.outline {
  border-color: #61758b;
  color: white;
}

.outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: white;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.75rem;
  color: #bbcadb;
}

.hero-tags span {
  border-left: 2px solid #3c6178;
  padding-left: 9px;
}

/* Map Panel in Hero */
.map-panel {
  padding: 24px;
  border: 1px solid #476077;
  border-radius: 16px;
  background: rgba(18, 38, 59, 0.9);
  box-shadow: 12px 18px 0 rgba(6, 17, 32, 0.25);
}

.map-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: .06em;
  color: #b8cad9;
}

.map-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 18px auto;
  width: 180px;
  height: 140px;
  background: radial-gradient(ellipse, #27546a, transparent 70%);
}

.map-center > span {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: 1.2;
  color: var(--cyan);
}

.map-center small {
  font-size: 0.75rem;
  color: #c9d6e5;
}

.map-nodes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.map-nodes a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #203950;
  border: 1px solid #456178;
  border-radius: 8px;
  font-size: 0.85rem;
  text-decoration: none;
  min-height: 44px;
  color: white;
}

.map-nodes a:hover {
  border-color: var(--cyan);
  background: #264562;
}

.map-nodes span {
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 700;
}

.map-panel > p {
  font-size: 0.75rem;
  margin: 18px 0 0 !important;
}

/* Layout Sections & Grids */
.section {
  padding-top: 64px;
  padding-bottom: 64px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.text-link {
  font-size: 0.9rem;
  color: var(--blue);
  font-weight: 650;
  text-underline-offset: 5px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
}

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

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

.grid > * {
  min-width: 0;
}

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

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

/* Cards */
.topic-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
  background: white;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.topic-card:hover, .featured:hover {
  border-color: #579cd0;
  box-shadow: 0 8px 26px rgba(19, 37, 61, 0.08);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.card-top .eyebrow {
  margin-bottom: 0;
}

.card-number {
  color: #53657a;
  font-size: 0.85rem;
  font-weight: 700;
}

.topic-card h3 {
  font-size: 1.4rem;
}

.topic-card p, .featured p {
  color: var(--muted);
  font-size: 0.95rem;
}

.card-link {
  margin-top: auto;
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.soft-band {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.featured {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  padding: 24px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--line);
}

.app-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: #e8f5f7;
  color: #174c60;
  border: 1px solid #d0e7ec;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -.04em;
  margin-bottom: 22px;
}

.featured:nth-child(2) .app-icon {
  background: #fff0e7;
  color: #915330;
  border-color: #f1d8c5;
}

.featured:nth-child(3) .app-icon {
  background: #edf0ff;
  color: #3b52a4;
  border-color: #dfe5fe;
}

.featured:nth-child(4) .app-icon {
  background: #e9f1ff;
  color: #2954bc;
  border-color: #d3e2fc;
}

/* Modern Professional Footer */
.site-footer {
  background: var(--navy);
  color: #cfdbeb;
  border-top: 1px solid #1a334d;
}

.footer-top-strip {
  background: #061324;
  border-bottom: 1px solid #172d47;
  padding: 24px 0;
}

.footer-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: 28px 0;
}

.footer-brand-summary {
  max-width: 760px;
  flex: 1 1 540px;
}

.footer-summary-text {
  color: #9ab1c9;
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 12px 0 0;
  max-width: 860px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 28px;
  padding: 30px 0 24px;
}

.footer-grid > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 220px;
}

.site-footer .brand {
  color: #ffffff;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.site-footer .brand-mark {
  background: none;
}

.footer-heading {
  width: 100%;
  font-size: 0.8rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #ffffff;
  margin: 0 0 18px;
  border-bottom: 1px solid rgba(151, 176, 205, 0.25);
  padding-bottom: 12px;
  display: block;
}

.footer-grid > div > a:not(.brand) {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 5px 0;
  font-size: 0.98rem;
  font-weight: 500;
  text-decoration: none;
  color: #a2b8d0;
  border-radius: 4px;
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-grid > div > a:not(.brand):hover {
  color: var(--cyan);
  transform: translateX(3px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 0 28px;
  border-top: 1px solid rgba(151, 176, 205, 0.2);
  color: #8da1bc;
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fine-bullet {
  color: #3b546e;
}

.footer-bottom-right {
  font-weight: 500;
  color: #9cb1c9;
}

/* Inner Page Header & Breadcrumb */
.breadcrumb {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 26px;
  font-size: 0.875rem;
  color: var(--muted);
  flex-wrap: wrap;
  overflow-wrap: anywhere;
}

.breadcrumb a {
  text-underline-offset: 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.page-head {
  padding-top: 32px;
  padding-bottom: 32px;
  overflow-wrap: anywhere;
}

.page-head h1 {
  max-width: 940px;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
}

.lede {
  font-size: 1.13rem;
  max-width: 840px;
  color: var(--muted);
}

.page-head .lede {
  margin: 0;
}

/* Article Layout */
.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 50px;
  padding-bottom: 64px;
  align-items: start;
}

.article-layout > * {
  min-width: 0;
}

.toc {
  position: sticky;
  top: 115px;
  padding: 20px 0;
  border-top: 2px solid var(--ink);
  overflow-wrap: anywhere;
}

.toc h2 {
  font-size: 0.875rem;
  letter-spacing: 0;
}

.toc a {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  text-decoration: none;
  font-size: 0.875rem;
  color: var(--muted);
  min-height: 44px;
  width: 100%;
  border-radius: 6px;
}

.toc a:hover {
  color: var(--blue);
  background: var(--paper);
}

.article {
  max-width: 920px;
  overflow-wrap: break-word;
}

.article section {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.article h2 {
  font-size: 1.75rem;
}

.article h3 {
  margin-top: 24px;
}

.article p, .article li {
  color: #2c4056;
}

.article li {
  margin-bottom: 10px;
}

.article a {
  color: var(--blue);
  text-underline-offset: 4px;
  padding: 2px 0;
  font-weight: 600;
}

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

.article ul, .article ol {
  padding-left: 22px;
}

.callout {
  background: #edf7fa;
  border-left: 4px solid #1f7d92;
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.concept {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
}

.concept h3 {
  margin-top: 0;
}

.concept p:last-child {
  margin-bottom: 0;
}

.source-note {
  padding: 22px;
  background: var(--paper);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 20px;
}

.source-note a {
  color: var(--blue);
}

.source-note ul {
  margin-bottom: 0;
}

/* Filters & Search Components */
.filters {
  background: var(--paper);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.filters-single {
  grid-template-columns: 1fr !important;
}

.field label {
  display: block;
  font-weight: 650;
  font-size: 0.875rem;
  margin-bottom: 8px;
  color: var(--ink);
}

.field input, .field select {
  width: 100%;
  min-height: 48px;
  border: 1.5px solid #8e9fad;
  background: white;
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 0.95rem;
}

.field input:focus-visible, .field select:focus-visible {
  outline: 3px solid #126bc8;
  outline-offset: 2px;
  border-color: #126bc8;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.875rem;
  color: var(--muted);
  margin: 18px 0 26px;
}

.reset {
  background: none;
  border: 1px solid transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--blue);
  cursor: pointer;
  padding: 10px 16px;
  min-height: 44px;
  min-width: 44px;
  font-size: 0.875rem;
  font-weight: 650;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.reset:hover {
  background: #eaf3fa;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ai-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  scroll-margin-top: 110px;
  background: white;
}

.ai-card:target {
  outline: 3px solid var(--blue);
  box-shadow: 0 0 0 6px rgba(21, 92, 189, 0.15), 0 8px 24px rgba(9, 25, 45, 0.08);
}

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

.ai-top .app-icon {
  margin: 0;
  flex-shrink: 0;
}

.ai-top h2 {
  font-size: 1.25rem;
  margin: 0 0 4px;
}

.ai-top p {
  font-size: 0.75rem;
  margin: 0;
  color: var(--muted);
}

/* High Contrast Badges (WCAG 4.5:1 AA Minimum) */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.badge {
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.5;
  padding: 4px 10px;
  border-radius: 6px;
  background: #eff3f8;
  color: #1e3550;
}

.badge.china {
  background: #fff1e8;
  color: #874e29;
}

.badge.ocidente {
  background: #e8f4fc;
  color: #125292;
}

.badge-free {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: #e6fcf5;
  color: #087f5b;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-tier {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: #e7f5ff;
  color: #1864ab;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-local {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f3d9fa;
  color: #862e9c;
  font-size: 0.78rem;
  font-weight: 700;
}

.ai-card > p {
  font-size: 0.95rem;
  color: var(--muted);
}

.ai-card details {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.ai-card summary, .faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.95rem;
  padding: 10px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-radius: 4px;
}

.ai-card summary:focus-visible, .faq summary:focus-visible {
  outline: 3px solid #126bc8;
  outline-offset: 2px;
}

.ai-card dl {
  font-size: 0.875rem;
  margin: 12px 0;
}

.ai-card dt {
  font-weight: 700;
}

.ai-card dd {
  margin: 0 0 12px;
  color: var(--muted);
}

.ai-card > a {
  margin-top: 16px;
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 650;
  text-underline-offset: 4px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.empty {
  padding: 48px;
  text-align: center;
  background: var(--paper);
  border-radius: 10px;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.faq summary {
  font-size: 1.05rem;
}

.faq details p {
  margin: 12px 0 8px;
}

/* Timeline Components */
.timeline {
  border-left: 3px solid #20889e;
  padding-left: 28px;
  margin-left: 6px;
}

.timeline-item {
  position: relative;
  padding: 0 0 24px;
}

.timeline-item:before {
  content: "";
  position: absolute;
  left: -35px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid white;
  box-shadow: 0 0 0 2px var(--blue);
}

.timeline-item time {
  color: var(--blue);
  font-weight: 750;
  font-size: 0.875rem;
}

.timeline-item h3 {
  margin: 6px 0 12px;
}

.glossary-item {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.glossary-item h2 {
  font-size: 1.2rem;
}

.glossary-item p {
  margin: 0;
  color: var(--muted);
}

/* Tables & Desktop/Mobile Layout (WCAG 2.1 AA) */
.comparison-wrap, .table-wrap {
  width: 100%;
  overflow-x: auto;
  touch-action: pan-x;
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(9, 25, 45, 0.04);
}

.comparison-wrap:focus-visible, .table-wrap:focus-visible {
  outline: 3px solid #126bc8;
  outline-offset: 3px;
}

.table-wrap::-webkit-scrollbar,
.comparison-wrap::-webkit-scrollbar {
  height: 7px;
}

.table-wrap::-webkit-scrollbar-track,
.comparison-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.table-wrap::-webkit-scrollbar-thumb,
.comparison-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.table-wrap::-webkit-scrollbar-thumb:hover,
.comparison-wrap::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.comparison, .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
  overflow-wrap: normal;
  word-break: normal;
}

.data-table {
  min-width: 820px;
}

.comparison {
  min-width: 600px;
}

.comparison caption, .data-table caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--navy);
  padding: 14px 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  letter-spacing: -0.01em;
}

.comparison th, .comparison td,
.data-table th, .data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  line-height: 1.55;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.comparison th, .data-table th {
  background: var(--navy);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid var(--cyan);
}

.data-table tr:nth-child(even), .comparison tr:nth-child(even) {
  background: #fbfdff;
}

.data-table tr:hover, .comparison tr:hover {
  background: #f0f7ff;
}

.data-table tr:last-child td,
.comparison tr:last-child td {
  border-bottom: none;
}

.data-table td strong {
  color: var(--navy);
  font-weight: 700;
}

.data-table th:first-child,
.data-table td:first-child {
  font-weight: 650;
  color: var(--navy);
}

/* Colunas de rótulos curtos que devem ficar em linha única */
.data-table td[data-label="Empresa"],
.data-table td[data-label="Desenvolvedor"],
.data-table td[data-label="Instituição / Provedor"],
.data-table td[data-label="Provedor / Plataforma"],
.data-table td[data-label="Categoria"],
.data-table td[data-label="Âmbito"],
.data-table td[data-label="Ano"],
.data-table td[data-label="Carga Horária / Formato"],
.data-table td[data-label="Cartão Exigido?"],
.data-table td[data-label="Acesso Oficial"],
.data-table td[data-label="Acesso / Link"],
.data-table td[data-label="Acesso / Fonte"],
.data-table td[data-label="Link Oficial"],
.data-table td[data-label="Repositório / Execução"],
.data-table td[data-label="Est. Citações / Link"],
.data-table td[data-label="Referência / DOI"],
.data-table td[data-label="Detalhes"] {
  white-space: nowrap;
}

/* Botões de ação em tabelas */
.data-table a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  background: #f0f6fc;
  border: 1px solid #c8d9ea;
  padding: 6px 13px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  line-height: 1.4;
  min-height: auto;
  transition: all 0.15s ease;
}

.data-table a:hover {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(18, 107, 200, 0.25);
}

/* Visual Figure Boxes */
.figure-box {
  margin: 28px 0;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
}

.figure-compact {
  margin: 0 !important;
}

.figure-box img, .figure-box svg {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  filter: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.figure-box figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.next-panel {
  margin-top: 30px;
  padding: 28px;
  background: var(--navy);
  color: white;
  border-radius: 12px;
}

.next-panel a {
  color: var(--cyan);
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.next-panel h2 {
  font-size: 1.5rem;
}

.next-panel p {
  color: #c3d2e1;
}

.content-bottom {
  padding-bottom: 64px;
}

.band-paper {
  background: var(--paper) !important;
}

code {
  font-size: 0.9em;
  background: #edf1f6;
  border-radius: 4px;
  padding: 2px 6px;
  overflow-wrap: anywhere;
}

/* Responsive Media Queries for Mobile & Tablet */
@media (max-width: 1000px) {
  .main-nav {
    gap: 16px;
  }
  .hero-grid {
    gap: 32px;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero h1 {
    font-size: 3rem;
  }
  .map-panel {
    padding: 18px;
  }
  .article-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 28px;
  }
  
  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .wrap {
    width: calc(100% - 36px);
  }
  .header-inner {
    min-height: 72px;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .brand {
    white-space: normal;
  }
  .brand > span:last-child {
    line-height: 1.2;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    padding: 20px 24px;
    border-bottom: 2px solid var(--line);
    box-shadow: 0 16px 32px rgba(9, 25, 45, 0.15);
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    z-index: 30;
  }
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .main-nav.is-open a {
    padding: 14px 16px;
    min-height: 48px;
    border-radius: 8px;
    background: var(--paper);
    border: 1px solid var(--line);
    font-size: 1rem;
  }
  .main-nav.is-open a[aria-current] {
    background: #e8f3fc;
    border-color: var(--blue);
  }
  .hero-grid {
    grid-template-columns: 1fr;
    padding: 40px 0;
    gap: 36px;
  }
  .hero h1 {
    font-size: clamp(2.35rem, 7vw, 3.3rem);
  }
  .map-panel {
    box-shadow: none;
  }
  .map-center {
    height: 90px;
    margin: 10px auto;
  }
  .map-nodes {
    grid-template-columns: 1fr 1fr;
  }
  .three, .four {
    grid-template-columns: 1fr;
  }
  .section {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
  .article-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .toc h2 {
    width: 100%;
    margin-bottom: 4px;
  }
  .toc a {
    padding: 8px 12px;
    width: auto;
    background: var(--paper);
    border-radius: 6px;
  }
  .page-head {
    padding-top: 24px;
  }
  .two {
    grid-template-columns: 1fr;
  }
  .catalog-grid {
    grid-template-columns: 1fr;
  }
  .ai-card {
    padding: 22px;
  }

  /* Tabelas viram cartões empilhados: sem rolagem horizontal no celular */
  .table-wrap, .comparison-wrap {
    overflow-x: visible;
    border: none;
    background: none;
  }
  .data-table, .comparison {
    min-width: 0;
    display: block;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
  }
  .data-table caption, .comparison caption {
    display: block;
    padding: 14px 16px 0;
  }
  .data-table thead, .comparison thead {
    display: none;
  }
  .data-table tbody, .comparison tbody {
    display: block;
  }
  .data-table tr, .comparison tr {
    display: block;
    border-bottom: 6px solid var(--line);
  }
  .data-table tr:last-child, .comparison tr:last-child {
    border-bottom: none;
  }
  .data-table td, .comparison td {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: auto;
    padding: 12px 16px;
    border-bottom: 1px dashed var(--line);
    white-space: normal !important;
  }
  .data-table td:last-child, .comparison td:last-child {
    border-bottom: none;
  }
  .data-table td::before, .comparison td::before {
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
  }
  .comparison th[scope="row"] {
    display: block;
    width: auto;
  }
  .data-table tr:nth-child(even), .comparison tr:nth-child(even) {
    background: none;
  }
  .data-table a {
    min-height: 0;
    line-height: 1.4;
  }
}

@media (max-width: 420px) {
  .filters {
    grid-template-columns: 1fr;
  }
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .brand {
    font-size: 1.05rem;
  }
  .hero-tags {
    gap: 8px;
  }
  .hero-grid {
    padding-top: 32px;
  }
  .map-nodes {
    grid-template-columns: 1fr;
  }
  .results-bar {
    align-items: flex-start;
    flex-direction: column;
  }
  
  .actions .button {
    width: 100%;
  }
  .empty {
    padding: 28px;
  }
  .comparison th, .comparison td {
    padding: 10px;
  }
  .map-label {
    font-size: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}

@media (max-width: 1000px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 36px 32px !important;
  }
}

@media (max-width: 600px) {
  .footer-top-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Print Stylesheet for Reports, Curricula, Legal Frameworks and Guides */
@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .filters,
  .results-bar,
  .next-panel,
  .menu-toggle,
  .toc,
  .breadcrumb,
  .actions {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10.5pt;
    line-height: 1.5;
  }
  .wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  details {
    display: block !important;
  }
  details[open] summary, details summary {
    font-weight: 700;
    margin-bottom: 8px;
  }
  .data-table, .comparison, .ai-card, .topic-card, .figure-box {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  a {
    color: #000000 !important;
    text-decoration: underline;
  }
}
