/* Biblioteca editorial — usa a hierarquia visual do blog sem compartilhar seus seletores globais. */
.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: #fff;
  color: var(--ink);
  border-radius: 4px;
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }

.topbar {
  background: #1a1714;
  border-bottom-color: rgba(245, 239, 227, 0.14);
}

.topbar .brand-logo:not(.brand-logo--light) { display: none; }
.topbar .brand-logo--light { display: block; mix-blend-mode: normal; }
.topbar .brand-info { color: rgba(245, 239, 227, 0.68); }
.topbar .brand-info strong { color: #d9c28a; }
.topbar a.back { color: rgba(245, 239, 227, 0.78); border-color: rgba(245, 239, 227, 0.22); }
.topbar a.back:hover { color: #d9c28a; border-color: #d9c28a; }
.topbar .nav-hamburger span { background: #f5efe3; }

.library-discovery {
  background: #1a1714;
  padding: 10px max(28px, calc((100vw - 1140px) / 2)) 18px;
}

.library-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 1140px;
  margin: 0 auto;
}

.library-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.library-search-field { position: relative; }
.library-search-field svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: #d9c28a;
  stroke-width: 1.8;
}

.library-search input {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px 10px 46px;
  border: 1px solid rgba(245, 239, 227, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #f5efe3;
  font: 14px/1.4 var(--sans);
}

.library-search input::placeholder { color: rgba(245, 239, 227, 0.52); }
.library-search input:focus {
  outline: 0;
  border-color: #d9c28a;
  box-shadow: 0 0 0 3px rgba(217, 194, 138, 0.2);
}

.library-search > button,
.library-results-head button {
  border: 0;
  background: transparent;
  color: var(--gold-text);
  font: 600 12px/1.4 var(--sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.library-search > button { color: #d9c28a; }

.hero {
  padding: 38px 0 50px;
  background: #1a1714;
  color: #f5efe3;
}

.hero::before {
  inset: 0;
  width: auto;
  height: auto;
  background: #d9c28a;
  opacity: 0.055;
  -webkit-mask: url(/img/favicon-512.png) center / 620px no-repeat;
  mask: url(/img/favicon-512.png) center / 620px no-repeat;
}

.hero-inner {
  grid-template-columns: minmax(0, 0.84fr) minmax(460px, 1.16fr);
  gap: 56px;
  align-items: center;
}

.hero-content { padding: 22px 0; }
.hero-eyebrow { color: #d9c28a; border-left-color: #d9c28a; }
.hero-eyebrow svg { stroke: #d9c28a; }
.hero h1 { max-width: 610px; color: #f5efe3; line-height: 0.98; }
.hero h1 em { display: block; color: #d9c28a; font-style: italic; font-weight: 400; }
.hero-lead { color: rgba(245, 239, 227, 0.7); font-size: 15px; line-height: 1.65; }
.hero-badge { color: rgba(245, 239, 227, 0.68); }
.hero-badge + .hero-badge { border-left-color: rgba(245, 239, 227, 0.18); }
.hero-badge svg { stroke: #d9c28a; }

.hero-feature { min-width: 0; }
.hero-feature-link {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 310px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.hero-feature-cover { min-height: 310px; background: var(--warm-mid); }
.hero-feature-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.hero-feature-copy { display: flex; flex-direction: column; justify-content: center; padding: 28px 30px; }
.hero-feature-label { color: var(--gold-text); font: 700 10px/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; }
.hero-feature-copy h2 { margin: 10px 0; font: 500 30px/1.05 var(--serif); }
.hero-feature-copy p { color: var(--ink-muted); font: 13px/1.55 var(--sans); }
.hero-feature-action { margin-top: 18px; color: var(--gold-text); font: 700 12px/1.4 var(--sans); }

.materiais {
  padding: 72px 0 92px;
  background: var(--warm-white);
  border: 0;
}

.materiais .section-header { margin-bottom: 28px; }
.materiais .section-title { font-size: clamp(32px, 4vw, 48px); }
.bib-free-badge { margin-top: 12px; }
.aviso { margin-bottom: 38px; }

.library-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
}

.library-topic-rail { position: sticky; top: 92px; }
.library-topic-heading {
  margin-bottom: 13px;
  color: var(--gold-text);
  font: 700 10px/1.4 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.filtro-bar { display: grid; gap: 7px; margin: 0; }
.filtro-btn {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-left: 4px solid var(--category-color, var(--gold));
  border-radius: 7px;
  background: var(--category-bg, #fff);
  color: var(--category-text, var(--ink));
  text-align: left;
  box-shadow: 0 2px 8px rgba(26, 23, 20, 0.06);
}

.filtro-btn:hover:not(:disabled) { color: var(--category-text, var(--ink)); transform: translateX(2px); }
.filtro-btn.active {
  background: var(--category-bg, var(--ink));
  color: var(--category-text, #fff);
  box-shadow: inset 0 0 0 2px var(--category-ring, rgba(255, 255, 255, 0.7)), 0 7px 18px rgba(26, 23, 20, 0.1);
}
.filtro-btn-count { opacity: 1; font-size: 10px; font-weight: 700; }

.library-feed { min-width: 0; }
.library-results-head { display: flex; align-items: center; justify-content: space-between; min-height: 28px; margin-bottom: 16px; }
.library-results-head p { color: var(--ink-muted); font: 600 12px/1.4 var(--sans); }

#kitBanner {
  margin-bottom: 34px !important;
  border-radius: 8px !important;
  box-shadow: 5px 5px 0 rgba(184, 150, 46, 0.16);
}

.pdf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.pdf-card {
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}
.pdf-card:hover { border-color: transparent; box-shadow: none; transform: translateY(-4px); }
.pdf-thumb { aspect-ratio: 16 / 10; border-radius: 10px; border: 1px solid var(--warm-border); }
.pdf-thumb-img { object-fit: cover; }
.pdf-card-body { padding: 16px 0 0; }
.pdf-title { font-size: 24px; }
.pdf-desc { line-height: 1.6; }
.pdf-divider { display: none; }
.btn-download {
  justify-content: flex-start;
  width: fit-content;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gold-text);
}
.btn-download:hover { background: transparent; color: var(--gold-deep); text-decoration: underline; text-underline-offset: 3px; }
.library-empty { padding: 56px 20px; text-align: center; border-top: 1px solid var(--warm-border); }
.library-empty h3 { margin-bottom: 8px; font: 500 28px/1.2 var(--serif); }
.library-empty p { color: var(--ink-muted); }

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-feature { display: block; max-width: 680px; }
  .library-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .library-topic-rail { position: static; }
  .filtro-bar { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; }
  .filtro-btn { display: inline-flex; width: auto; flex: 0 0 auto; border-left: 0; border-top: 3px solid var(--category-color, var(--gold)); }
  .pdf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .library-discovery { padding: 10px 16px 16px; }
  .library-search { grid-template-columns: 1fr; }
  .library-search > button { justify-self: start; padding: 2px 0; }
  .hero { padding: 30px 0 42px; }
  .hero h1 { font-size: 41px; }
  .hero-feature-link { grid-template-columns: 1fr; }
  .hero-feature-cover { min-height: 220px; max-height: 280px; }
  .hero-feature-copy { padding: 22px; }
  .hero-feature-copy h2 { font-size: 26px; }
  .hero-badges { gap: 9px 0; }
  .hero-badge { padding: 0 9px; }
  .materiais { padding: 54px 0 70px; }
  .aviso { margin-bottom: 28px; }
  .pdf-grid { grid-template-columns: 1fr; gap: 38px; }
  #kitBanner { align-items: flex-start !important; flex-wrap: wrap; }
  #kitBanner > span:last-child { width: 100%; text-align: center; }
}
