:root {
  --bg: #f4f8fc;
  --surface: #ffffff;
  --surface-soft: #edf5ff;
  --ink: #071d3a;
  --muted: #65758b;
  --line: #dce6f2;
  --blue: #0877ff;
  --blue-dark: #075bc1;
  --gold: #d8ad5f;
  --green: #18b66b;
  --shadow: 0 18px 50px rgba(7, 29, 58, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 29, 58, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #f2d796);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  font-size: 0.95rem;
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  border: 1px solid var(--blue);
  box-shadow: 0 12px 28px rgba(8, 119, 255, 0.22);
}

.button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}

.hero {
  background:
    radial-gradient(circle at 82% 20%, rgba(8, 119, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #071d3a 0%, #0a2a52 74%, var(--bg) 74%);
  padding: 78px 0 46px;
}

.hero-inner {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d7e7ff;
  font-weight: 800;
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(24, 182, 107, 0.18);
}

h1 {
  max-width: 820px;
  margin: 0;
  color: #fff;
  font-size: clamp(2.3rem, 6vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.6;
  margin: 24px 0 0;
}

.search-panel {
  margin-top: 38px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.hero-stats {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-stats span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-weight: 800;
}

.search-box {
  min-width: 0;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--muted);
  background: #f9fbfe;
  font: inherit;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  outline: none;
}

.search-box:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(8, 119, 255, 0.12);
}

.main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 84px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 42px 0 20px;
}

h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-head p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 600;
}

.quick-grid,
.category-grid {
  display: grid;
  gap: 16px;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(7, 29, 58, 0.045);
}

button.card {
  width: 100%;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.category-card:hover,
.quick-grid .card:hover,
.article-link:hover,
.text-button:hover {
  border-color: rgba(8, 119, 255, 0.36);
  transform: translateY(-1px);
}

.card strong {
  display: block;
  font-size: 1.12rem;
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 600;
}

.category-count {
  display: inline-flex;
  margin-top: 12px;
  color: var(--blue);
  font-weight: 800;
  font-size: 0.9rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--blue-dark);
  font-weight: 800;
  font-size: 0.78rem;
  margin-bottom: 14px;
}

.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.article-link {
  min-height: 64px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 800;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.article-link span {
  color: var(--blue);
}

.article-link-rich {
  align-items: flex-start;
}

.article-link-body {
  display: grid;
  gap: 8px;
  color: var(--ink);
}

.article-link-body small {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.45;
}

.article-count,
.source-note {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.6;
}

.empty-state {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.55;
}

.area-sections {
  display: grid;
  gap: 20px;
}

.area-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 10px 28px rgba(7, 29, 58, 0.045);
}

.area-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.area-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.area-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.55;
}

.area-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.text-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--blue-dark);
  border-radius: 8px;
  min-height: 38px;
  padding: 0 12px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.article-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 84px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--blue-dark);
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 54px);
}

.article-card h1 {
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.article-meta {
  margin: 18px 0 28px;
  color: var(--muted);
  font-weight: 700;
}

.article-card h2 {
  margin-top: 36px;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
}

.article-card h3 {
  margin-top: 26px;
  font-size: 1.2rem;
}

.article-card p,
.article-card li {
  color: #31425c;
  font-size: 1.04rem;
  line-height: 1.72;
}

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

.imported-article-content {
  color: #132b4a;
  line-height: 1.72;
  font-size: 1.02rem;
}

.imported-article-content h2,
.imported-article-content h3,
.imported-article-content h4 {
  color: var(--ink);
  margin-top: 34px;
}

.imported-article-content table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 22px 0;
}

.imported-article-content td,
.imported-article-content th {
  border: 1px solid var(--line);
  padding: 10px;
}

.imported-article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 22px 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(7, 29, 58, 0.08);
}

.notice {
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: 8px;
  border: 1px solid #bee1ff;
  background: #eef7ff;
  color: var(--ink);
  font-weight: 700;
}

.article-image {
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fbff;
}

.article-image img {
  display: block;
  width: 100%;
  height: auto;
}

.article-image figcaption {
  padding: 12px 14px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.article-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.cta-band {
  margin-top: 48px;
  background: linear-gradient(135deg, #071d3a, #0a315f);
  color: #fff;
  border-radius: 8px;
  padding: clamp(28px, 5vw, 48px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.78);
  margin: 12px 0 0;
  line-height: 1.6;
}

.footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 32px 0;
}

.footer-inner {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 900px) {
  .nav {
    min-height: 66px;
    width: min(100% - 24px, 1160px);
    gap: 10px;
  }

  .nav-links {
    display: none;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .nav-cta {
    min-height: 42px;
    padding: 0 12px;
    font-size: 0.88rem;
    box-shadow: none;
  }

  .hero {
    padding-top: 54px;
  }

  .search-panel,
  .cta-band {
    grid-template-columns: 1fr;
  }

  .search-panel .button,
  .cta-band .button {
    width: 100%;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head p {
    max-width: 100%;
  }

  .quick-grid,
  .category-grid,
  .article-list,
  .area-list {
    grid-template-columns: 1fr;
  }

  .area-card-head {
    display: grid;
  }

  .footer-inner {
    flex-direction: column;
  }

  .article-footer-nav {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .nav-cta {
    max-width: 104px;
    overflow: hidden;
    white-space: nowrap;
  }

  .nav-cta {
    font-size: 0;
  }

  .nav-cta::after {
    content: "Suporte";
    font-size: 0.88rem;
  }

  .hero-inner,
  .main,
  .footer-inner {
    width: min(100% - 32px, 1160px);
  }
}
