.apl-page {
  --apl-primary: #667eea;
  --apl-primary-dark: #545fcb;
  --apl-primary-soft: #f0f1ff;
  --apl-ink: #1f2937;
  --apl-muted: #6b7280;
  --apl-border: #e5e7eb;
  min-height: calc(100vh - 72px);
  color: var(--apl-ink);
  background: #f7f8fb;
}

.apl-shell {
  padding-top: 2.25rem;
  padding-bottom: 3.5rem;
}

.apl-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.75rem;
  border: 1px solid var(--apl-border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 0, rgba(102, 126, 234, .12), transparent 18rem),
    #fff;
}

.apl-hero-copy {
  max-width: 710px;
}

.apl-eyebrow,
.apl-section-label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--apl-primary-dark);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.apl-hero h1 {
  margin: .45rem 0 .35rem;
  font-size: clamp(2rem, 4vw, 2.65rem);
  font-weight: 760;
  letter-spacing: -.04em;
}

.apl-hero p {
  max-width: 640px;
  margin: 0;
  color: var(--apl-muted);
  font-size: .95rem;
  line-height: 1.6;
}

.apl-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .65rem;
}

.apl-page .ct-btn {
  min-height: 42px;
  border-radius: 9px;
  box-shadow: none;
  transform: none;
}

.apl-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) minmax(220px, .8fr) auto;
  align-items: end;
  gap: .85rem;
  margin: 1.25rem 0 2rem;
  padding: 1rem;
  border: 1px solid var(--apl-border);
  border-radius: 14px;
  background: #fff;
}

.apl-field {
  min-width: 0;
}

.apl-field label {
  display: block;
  margin-bottom: .38rem;
  color: #374151;
  font-size: .75rem;
  font-weight: 700;
}

.apl-control {
  position: relative;
}

.apl-control i {
  position: absolute;
  top: 50%;
  left: .9rem;
  color: #9ca3af;
  transform: translateY(-50%);
  pointer-events: none;
}

.apl-field input,
.apl-field select {
  width: 100%;
  min-height: 44px;
  padding: .65rem .85rem;
  border: 1px solid #d8dce5;
  border-radius: 9px;
  background: #fff;
  color: var(--apl-ink);
  font-size: .88rem;
}

.apl-field input {
  padding-left: 2.55rem;
}

.apl-field input:focus,
.apl-field select:focus {
  border-color: var(--apl-primary);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, .13);
}

.apl-results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.apl-results-heading h2 {
  margin: .18rem 0 0;
  font-size: 1.25rem;
  font-weight: 740;
}

.apl-count {
  padding: .35rem .65rem;
  border-radius: 999px;
  background: #eef0f4;
  color: var(--apl-muted);
  font-size: .74rem;
  font-weight: 700;
}

.apl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}

.apc-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding: 1.15rem;
  border: 1px solid var(--apl-border);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.apc-card:hover {
  border-color: rgba(102, 126, 234, .55);
  box-shadow: 0 10px 28px rgba(31, 41, 55, .08);
  color: inherit;
  text-decoration: none;
  transform: translateY(-2px);
}

.apc-card:focus-visible {
  outline: 3px solid rgba(102, 126, 234, .25);
  outline-offset: 3px;
}

.apc-top {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.apc-emoji {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--apc-cor, #667eea) 16%, white);
  color: var(--apc-cor, #667eea);
  font-size: 1.2rem;
}

.apc-info {
  min-width: 0;
  flex: 1;
}

.apc-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--apl-ink);
  font-size: .96rem;
  font-weight: 740;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.apc-cat,
.apc-author {
  margin: .12rem 0 0;
  overflow: hidden;
  font-size: .72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apc-cat {
  color: var(--apl-primary-dark);
  font-weight: 650;
}

.apc-author {
  color: var(--apl-muted);
}

.apc-summary {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #4b5563;
  font-size: .8rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.apc-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.apc-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .55rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
}

.apc-badge-apostila {
  background: var(--apl-primary-soft);
  color: var(--apl-primary-dark);
}

.apc-badge-cap {
  background: #f3f4f6;
  color: #5f6673;
}

.apc-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid #eef0f4;
  color: var(--apl-muted);
  font-size: .72rem;
}

.apc-stats span {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.apc-stats .fa-eye,
.apc-open {
  color: var(--apl-primary-dark);
}

.apc-open {
  font-weight: 700;
}

.apl-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem;
  border: 1px dashed #d8dce5;
  border-radius: 14px;
  background: #fff;
  text-align: center;
}

.apl-empty-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: .85rem;
  border-radius: 14px;
  background: var(--apl-primary-soft);
  color: var(--apl-primary);
  font-size: 1.25rem;
}

.apl-empty h2 {
  margin: 0;
  font-size: 1.2rem;
}

.apl-empty p {
  margin: .4rem 0 1rem;
  color: var(--apl-muted);
  font-size: .86rem;
}

@media (max-width: 767.98px) {
  .apl-shell {
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  .apl-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.25rem;
  }

  .apl-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .apl-filters {
    grid-template-columns: 1fr;
  }

  .apl-filters .ct-btn {
    width: 100%;
  }

  .apl-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .apl-hero h1 {
    font-size: 1.85rem;
  }

  .apl-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .apl-actions .ct-btn {
    width: 100%;
  }

  .apl-results-heading {
    align-items: flex-start;
  }

  .apc-open {
    font-size: 0;
  }

  .apc-open i {
    font-size: .75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apl-page *,
  .apl-page *::before,
  .apl-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
