@font-face {
  font-family: Manrope;
  src: url('../fonts/Manrope[wght].ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --petroleo: #153e56;
  --menta: #d9ede5;
  --branco: #fff;
  --nevoa: #f6faf8;
  --teal: #006d68;
  --ardosia: #4c616a;
  --linha: #afc4bc;
  --largura: 1280px;
  font-family: Manrope, Arial, sans-serif;
  color: var(--petroleo);
  background: var(--branco);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { display: flex; min-height: 100vh; flex-direction: column; margin: 0; background: var(--branco); font-size: 17px; line-height: 1.6; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--petroleo); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
button, input, summary { font: inherit; }
h1, h2, h3, p, figure { margin-top: 0; }
h1, h2, h3 { color: var(--petroleo); line-height: 1.12; font-weight: 750; letter-spacing: -.035em; }
h1 { font-size: clamp(2.25rem, 4vw, 4rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.35rem; }
.skip-link { position: absolute; z-index: 10; top: 8px; left: 8px; padding: 12px 16px; background: var(--petroleo); color: var(--branco); transform: translateY(-160%); }
.skip-link:focus { position: relative; display: inline-block; margin: 8px; transform: translateY(0); }

.site-header { background: var(--branco); border-bottom: 1px solid var(--linha); }
.site-header__inner { width: min(var(--largura), calc(100% - 48px)); min-height: 88px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.site-brand { display: inline-flex; flex: 0 0 auto; align-items: center; }
.site-brand img { width: min(240px, 24vw); height: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 1.7vw, 28px); }
.site-nav a, .mobile-nav a { color: var(--petroleo); font-size: 14px; font-weight: 600; white-space: nowrap; }
.site-nav a, .site-footer__inner nav a { display: inline-flex; min-height: 44px; align-items: center; }
.site-nav__search { font-weight: 750 !important; }
.site-nav__categories { display: flex; align-items: center; gap: clamp(6px, .9vw, 14px); }
.site-nav__categories a { font-size: 14px; font-weight: 600; }
.mobile-nav__topics > summary { color: var(--petroleo); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.mobile-nav__topics > summary::-webkit-details-marker { display: none; }
.mobile-nav__topics > summary span { margin-left: 4px; }
.mobile-nav { display: none; }

main { flex: 1; width: min(var(--largura), calc(100% - 48px)); min-height: 56vh; margin: 0 auto; }
.page-home main { min-height: 0; padding-top: 32px; }
.home-intro { max-width: 760px; padding: 28px 0 40px; }
.home-intro h1 { max-width: 14ch; margin-bottom: 18px; font-size: clamp(2.25rem, 4vw, 3rem); }
.home-intro p { max-width: 66ch; margin-bottom: 0; color: var(--ardosia); font-size: clamp(1.1rem, 1.8vw, 1.3rem); }
.home-discovery { padding: 24px 0 40px; border-top: 1px solid var(--linha); }
.home-discovery__search { max-width: 640px; }
.search-form--home { max-width: none; margin: 0; }
.home-featured { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px; padding: 16px 0 36px; border-top: 1px solid var(--linha); }
.home-featured--text-only { grid-template-columns: minmax(0, 1fr); }
.home-featured--text-only .home-hero__copy { max-width: 760px; }
.home-hero__copy { min-width: 0; }
.home-hero__copy h2 { max-width: 18ch; margin-bottom: 18px; }
.home-hero__copy h2 a { color: inherit; text-decoration: none; }
.home-hero__image { margin: 0; background: var(--menta); }
.home-hero__image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.eyebrow { margin-bottom: 14px; color: var(--petroleo); font-size: 12px; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.standfirst { max-width: 58ch; margin-bottom: 24px; color: var(--petroleo); font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; }
.home-stories { padding: 16px 0 24px; }
.home-stories > h2 { margin-bottom: 24px; }
.home-shelf { padding: 24px 0; border-top: 1px solid var(--linha); }
.home-shelf__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.home-shelf__header h2 { margin-bottom: 0; }
.home-shelf__header a { display: inline-flex; min-height: 44px; align-items: center; }
.home-shelf .article-grid { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin-top: 24px; }
.home-all-articles { margin: 16px 0 56px; }
.search-form { max-width: 640px; margin-top: 36px; }
.search-form label { display: block; margin-bottom: 8px; color: var(--petroleo); font-size: 14px; font-weight: 700; }
.search-form__row { display: flex; min-height: 54px; border: 1px solid var(--petroleo); }
.search-form input { width: 100%; min-width: 0; border: 0; padding: 12px 16px; color: var(--petroleo); background: var(--branco); }
.search-form button { flex: 0 0 54px; min-height: 52px; border: 0; background: var(--branco); color: var(--teal); cursor: pointer; font-size: 24px; }
.search-form button:hover { background: var(--menta); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.article-card { min-width: 0; border-top: 2px solid var(--petroleo); }
.article-card__image { display: block; margin: 0 -1px 18px; }
.article-card__image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-card__body { padding: 18px 0 8px; }
.article-card .eyebrow { margin-bottom: 10px; font-size: 11px; }
.article-card h2 { margin-bottom: 10px; font-size: clamp(1.25rem, 2vw, 1.6rem); }
.article-card h2 a { color: var(--petroleo); text-decoration: none; }
.article-card p:not(.eyebrow) { margin-bottom: 12px; color: var(--ardosia); font-size: 15px; }
.article-card time { color: var(--ardosia); font-size: 13px; }

.archive-page { padding: 40px 0 72px; }
.page-heading { padding: 26px 0 28px; border-bottom: 1px solid var(--linha); }
.page-heading h1 { max-width: 18ch; margin-bottom: 12px; }
.page-heading .standfirst { margin-bottom: 0; }
.breadcrumbs { display: flex; align-items: center; gap: 12px; color: var(--ardosia); font-size: 13px; }
.breadcrumbs a { color: var(--teal); }
.article-reading { padding: 28px 0 72px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: clamp(28px, 5vw, 72px); padding-top: 16px; }
.article-layout--single { grid-template-columns: minmax(0, 1fr); }
.article-main { min-width: 0; }
.article-main > .page-heading { padding-top: 16px; }
.article-main > .eyebrow { margin: 10px 0 -12px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; color: var(--ardosia); font-size: 13px; }
.article-figure { margin: 24px 0; }
.article-figure img { width: 100%; max-height: 640px; object-fit: cover; }
.article-figure figcaption { margin-top: 8px; color: var(--ardosia); font-size: 13px; }
.prose { max-width: 72ch; padding-top: 22px; color: var(--petroleo); font-size: 18px; line-height: 1.65; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 40px 0 14px; font-size: clamp(1.5rem, 2.5vw, 2rem); }
.prose h3 { margin: 30px 0 12px; font-size: 1.35rem; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 22px; }
.prose li + li { margin-top: 8px; }
.prose table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { min-width: 120px; padding: 12px; border: 1px solid var(--linha); text-align: left; }
.prose blockquote, .context-note { padding: 20px 22px; border-left: 4px solid var(--petroleo); background: var(--menta); }
.context-note { margin-top: 32px; }
.context-note h2 { margin: 0 0 8px; font-size: 16px; letter-spacing: 0; }
.context-note p { margin: 0; }
.article-aside { align-self: stretch; min-width: 0; padding: 24px 0 0 24px; border-left: 1px solid var(--linha); }
.article-aside h2, .mobile-toc summary { margin-bottom: 18px; font-size: 12px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.article-aside ul { margin: 0; padding: 0; list-style: none; }
.article-aside li + li { margin-top: 14px; }
.article-aside a { color: var(--petroleo); font-size: 14px; }
.mobile-toc { display: none; }
.ad-slot { min-height: 220px; margin-top: 28px; border: 1px solid var(--linha); color: var(--ardosia); text-align: center; }
.ad-slot::before { content: 'Publicidade'; display: block; padding-top: 14px; font-size: 11px; }
.empty-state { margin: 36px 0; padding: 24px 0; border-top: 1px solid var(--linha); color: var(--ardosia); }
.empty-state--archive { border-top: 0; }
.empty-state p:last-child { margin-bottom: 0; }
.search-page .page-heading { border-bottom: 0; }
.result-count { margin: 30px 0 18px; color: var(--ardosia); font-size: 14px; }
.institutional { max-width: 1120px; margin: 0 auto; }

.error-panel { margin: 40px 0 72px; padding: clamp(32px, 6vw, 72px); background: var(--petroleo); color: var(--branco); }
.error-panel .eyebrow, .error-panel h1 { color: var(--branco); }
.error-code { display: block; margin: 12px 0; color: var(--branco); font-size: clamp(3.5rem, 9vw, 6.5rem); font-weight: 750; line-height: 1; }
.error-panel h1 { margin-bottom: 24px; font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: 0; }
.error-panel a { color: var(--branco); }
.error-panel nav { display: flex; flex-wrap: wrap; gap: 16px 24px; }

.site-footer { border-top: 1px solid var(--linha); background: var(--nevoa); }
.site-footer__inner { width: min(var(--largura), calc(100% - 48px)); min-height: 96px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-footer__brand { display: inline-flex; align-items: center; gap: 12px; color: var(--petroleo); font-weight: 750; text-decoration: none; }
.site-footer__brand img { width: 40px; height: 40px; }
.site-footer__inner nav { display: flex; gap: 20px; }
.site-footer__inner nav a { color: var(--teal); }

@media (max-width: 1023px) {
  .site-header__inner { gap: 20px; }
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 12px; }
  .site-nav__categories { gap: clamp(4px, .8vw, 8px); }
  .site-brand img { width: 190px; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 180px; gap: 32px; }
}

@media (max-width: 767px) {
  .site-header__inner, main, .site-footer__inner { width: calc(100% - 32px); }
  .site-header__inner { min-height: 72px; gap: 16px; }
  .site-brand img { width: min(205px, 58vw); }
  .site-nav { display: none; }
  .mobile-nav { position: relative; display: block; }
  .mobile-nav summary { display: flex; min-height: 44px; align-items: center; gap: 8px; padding: 8px; color: var(--petroleo); cursor: pointer; list-style: none; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav[open] nav { position: absolute; z-index: 5; top: calc(100% + 1px); right: -16px; display: grid; min-width: 230px; gap: 0; padding: 12px 16px; border: 1px solid var(--linha); background: var(--branco); box-shadow: 0 12px 32px rgb(21 62 86 / 12%); }
  .mobile-nav[open] a { display: flex; min-height: 44px; align-items: center; }
  .mobile-nav__topics > summary { display: flex; min-height: 44px; align-items: center; color: var(--petroleo); cursor: pointer; }
  .mobile-nav__topics > div { display: grid; padding-left: 12px; }
  main { min-height: 56vh; }
  .page-home main { min-height: 0; padding-top: 12px; }
  .home-intro { padding: 22px 0 28px; }
  .home-intro h1 { font-size: clamp(2rem, 8vw, 2.4rem); }
  .home-discovery { padding: 22px 0 32px; }
  .home-featured { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 20px 0 24px; }
  .home-hero__copy h2 { max-width: 18ch; font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .home-hero__image img { aspect-ratio: 4 / 3; }
  .search-form { margin-top: 26px; }
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .article-card { display: grid; grid-template-columns: minmax(96px, 34%) minmax(0, 1fr); gap: 14px; padding: 16px 0; }
  .article-card--text-only { grid-template-columns: minmax(0, 1fr); }
  .article-card__image { grid-row: span 2; margin: 0; }
  .article-card__image img { aspect-ratio: 1; }
  .article-card__body { padding: 0; }
  .article-card h2 { font-size: 1.25rem; }
  .archive-page, .article-reading { padding: 24px 0 44px; }
  .page-heading { padding: 22px 0; }
  .page-heading h1 { font-size: clamp(1.9rem, 8vw, 2.3rem); }
  .article-layout, .article-layout--single { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .article-aside { padding: 0; border: 0; }
  .desktop-toc { display: none; }
  .mobile-toc { display: block; padding: 16px; border: 1px solid var(--linha); }
  .mobile-toc summary { min-height: 44px; margin: -8px 0 8px; padding: 10px 0; cursor: pointer; list-style: none; }
  .mobile-toc summary::-webkit-details-marker { display: none; }
  .mobile-toc[open] summary { margin-bottom: 12px; }
  .prose { padding-top: 20px; font-size: 18px; }
  .article-figure { margin: 22px 0; }
  .error-panel { margin: 24px 0 44px; padding: 32px 24px; }
  .site-footer__inner { min-height: 80px; }
  .site-footer__inner nav { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
