/* CeOP — páginas públicas: Bolsas de estudo, Comunicados e destaques da página inicial.
 * Usa os tokens de /css/ceop-shell.css. O prazo é o elemento principal de cada
 * oportunidade: é o que decide se ainda dá para concorrer.
 */
body.ceop-pub { margin: 0; background: var(--cs-paper); color: var(--cs-ink); font: 400 16px/1.6 var(--cs-body); }
.pub-wrap { width: min(1200px, calc(100% - 32px)); margin: 0 auto; }
.pub-top { background: var(--cs-surface); border-bottom: 1px solid var(--cs-line); position: sticky; top: 0; z-index: 50; }
.pub-top .pub-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.pub-top img { height: 34px; display: block; }
.pub-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.pub-nav a { color: var(--cs-ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.pub-nav a:hover { background: var(--cs-paper); }
.pub-nav a[aria-current="page"] { color: var(--cs-aluno); box-shadow: inset 0 -3px 0 var(--cs-aluno); border-radius: 0; }
.pub-nav .pub-enter { background: var(--cs-ink); color: #fff; }
.pub-nav .pub-enter:hover { background: #0e2131; }
@media (max-width: 720px) {
  .pub-top .pub-wrap { flex-direction: column; align-items: flex-start; padding: 10px 0; gap: 6px; }
  .pub-nav { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; width: 100%; }
  .pub-nav a { white-space: nowrap; padding: 8px 10px; }
}

.pub-hero { padding: clamp(32px, 6vw, 64px) 0 28px; }
.pub-hero h1 { margin: 0; font: 800 clamp(40px, 7vw, 80px)/.95 var(--cs-display); letter-spacing: -.04em; max-width: 14ch; }
.pub-hero p { margin: 16px 0 0; font-size: clamp(17px, 2vw, 19px); max-width: 62ch; color: #2c4458; }
.pub-search { display: flex; gap: 8px; margin-top: 24px; max-width: 640px; }
.pub-search input { flex: 1; min-width: 0; min-height: 50px; padding: 0 16px; font: 500 16px var(--cs-body); border: 2px solid var(--cs-ink); border-radius: 12px; background: #fff; color: var(--cs-ink); }

.pub-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; padding-bottom: 48px; }
.pub-filters { position: sticky; top: 84px; display: grid; gap: 14px; padding: 18px; background: var(--cs-surface); border: 1px solid var(--cs-line); border-radius: 14px; }
.pub-filters h2 { margin: 0; font: 700 18px var(--cs-display); }
.pub-filters label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; color: var(--cs-muted); }
.pub-filters select { min-height: 42px; padding: 0 10px; font: 500 15px var(--cs-body); color: var(--cs-ink); border: 1px solid var(--cs-line); border-radius: 9px; background: #fff; width: 100%; }
.pub-filters button { min-height: 40px; border: 0; background: none; color: var(--cs-ink); font: 600 14px var(--cs-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; justify-self: start; padding: 0; }
.pub-count { margin: 0 0 14px; font-size: 15px; color: var(--cs-muted); }
@media (max-width: 900px) {
  .pub-layout { grid-template-columns: 1fr; gap: 18px; }
  .pub-filters { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pub-filters h2, .pub-filters button { grid-column: 1 / -1; }
}

/* Cartão de bolsa */
.bolsa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.bolsa-card { display: flex; flex-direction: column; background: var(--cs-surface); border: 1px solid var(--cs-line); border-radius: 14px; overflow: hidden; }
.bolsa-deadline { display: grid; gap: 2px; padding: 14px 18px; background: var(--cs-aluno); color: #fff; }
.bolsa-deadline strong { font: 800 24px/1.1 var(--cs-display); letter-spacing: -.02em; }
.bolsa-deadline span { font-size: 13px; opacity: .9; }
.bolsa-card[data-urgency="soon"] .bolsa-deadline { background: #9a4a0b; }
.bolsa-card[data-urgency="later"] .bolsa-deadline { background: var(--cs-prof); }
.bolsa-card[data-urgency="closed"] .bolsa-deadline { background: #66717d; }
.bolsa-body { padding: 16px 18px 18px; display: grid; gap: 10px; flex: 1; align-content: start; }
.bolsa-body h3 { margin: 0; font: 700 20px/1.25 var(--cs-display); letter-spacing: -.01em; }
.bolsa-meta { margin: 0; font-size: 14px; color: var(--cs-muted); }
.bolsa-meta b { color: var(--cs-ink); font-weight: 600; }
.bolsa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bolsa-chips li { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--cs-aluno-soft); color: #165244; font-weight: 600; }
.bolsa-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.pub-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; font: 700 15px var(--cs-body); text-decoration: none; cursor: pointer; border: 2px solid var(--cs-ink); background: var(--cs-ink); color: #fff; }
.pub-btn.ghost { background: #fff; color: var(--cs-ink); }
.pub-btn:hover { filter: brightness(1.15); }
.pub-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.estado { display: inline-block; justify-self: start; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 6px; }
.estado[data-tone="open"] { background: #dff3e8; color: #135c40; }
.estado[data-tone="soon"] { background: #e7e9f8; color: #2f3e9e; }
.estado[data-tone="closed"], .estado[data-tone="archived"] { background: #eceff2; color: #4c5966; }
.estado[data-tone="review"] { background: #fbefd9; color: #7a4f0e; }
.estado[data-tone="results"] { background: #f6e4ec; color: #8a3358; }

.pub-empty { padding: 36px 24px; text-align: center; background: var(--cs-surface); border: 1px dashed #b9c3cc; border-radius: 14px; }
.pub-empty h3 { margin: 0 0 6px; font: 700 20px var(--cs-display); }
.pub-empty p { margin: 0; color: var(--cs-muted); }
.pub-error { padding: 14px 16px; border-radius: 10px; background: #fbe9e9; color: #7d1f1f; font-weight: 600; }

/* Resultados e comunicados: listas cronológicas */
.pub-section { padding: 40px 0; border-top: 1px solid var(--cs-line); }
.pub-section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pub-section-head h2 { margin: 0; font: 800 clamp(28px, 4vw, 40px)/1.05 var(--cs-display); letter-spacing: -.03em; }
.pub-section-head p { margin: 6px 0 0; color: var(--cs-muted); max-width: 60ch; }
.pub-section-head a { color: var(--cs-ink); font-weight: 700; }
.pub-list { list-style: none; margin: 0; padding: 0; background: var(--cs-surface); border: 1px solid var(--cs-line); border-radius: 14px; }
.pub-list > li { display: grid; grid-template-columns: 150px 1fr auto; gap: 16px; align-items: start; padding: 16px 18px; }
.pub-list > li + li { border-top: 1px solid var(--cs-line); }
.pub-list time { font-size: 14px; color: var(--cs-muted); font-weight: 600; }
.pub-list h3 { margin: 0; font: 700 17px/1.3 var(--cs-body); }
.pub-list p { margin: 4px 0 0; font-size: 15px; color: #2c4458; white-space: pre-line; }
.pub-list .pub-links { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: flex-end; }
.pub-list .pub-links a { font-weight: 700; color: var(--cs-ink); font-size: 14px; }
.pub-list .destaque h3::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 2px; background: var(--cs-coord); }
@media (max-width: 700px) { .pub-list > li { grid-template-columns: 1fr; gap: 6px; } .pub-list .pub-links { justify-content: flex-start; } }

/* Detalhe da bolsa */
.bolsa-dialog { width: min(820px, calc(100% - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 30px 80px rgba(20,45,66,.35); color: var(--cs-ink); }
.bolsa-dialog::backdrop { background: rgba(20, 45, 66, .5); }
.bolsa-dialog header { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 16px; padding: 20px 24px; background: var(--cs-ink); color: #fff; }
.bolsa-dialog header h2 { margin: 0; font: 800 26px/1.15 var(--cs-display); letter-spacing: -.02em; }
.bolsa-dialog header p { margin: 6px 0 0; opacity: .85; }
.bolsa-dialog header button { flex: none; width: 42px; height: 42px; border: 0; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; cursor: pointer; }
.bolsa-detail { padding: 8px 24px 24px; }
.bolsa-detail section { padding: 16px 0; border-bottom: 1px solid var(--cs-line); }
.bolsa-detail section:last-child { border-bottom: 0; }
.bolsa-detail h3 { margin: 0 0 8px; font: 700 17px var(--cs-display); }
.bolsa-detail .pre { white-space: pre-line; margin: 0; }
.bolsa-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px 20px; margin: 0; }
.bolsa-facts dt { font-size: 13px; color: var(--cs-muted); font-weight: 700; }
.bolsa-facts dd { margin: 0; font-weight: 600; }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.benefits li::before { content: "\2713"; display: inline-block; width: 22px; font-weight: 800; color: var(--cs-aluno); }
.benefits li.no { color: var(--cs-muted); }
.benefits li.no::before { content: "\2014"; color: #9aa6b1; }
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.docs li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--cs-line); border-radius: 10px; }
.docs li span { font-weight: 600; }
.docs li div { display: flex; gap: 14px; }
.docs a { font-weight: 700; color: var(--cs-ink); }

/* Destaques na página inicial */
.home-block { padding: 56px 0 8px; }
.home-block .pub-section-head h2 { font-family: Manrope, var(--cs-display); }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.offer-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--cs-line); border-radius: 16px; overflow: hidden; }
.offer-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--cs-aluno-soft); display: block; }
.offer-art { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--cs-aluno); color: #fff; font: 800 30px var(--cs-display); letter-spacing: -.02em; padding: 16px; text-align: center; }
.offer-card[data-kind="workshop"] .offer-art { background: var(--cs-prof); }
.offer-body { padding: 16px 18px 18px; display: grid; gap: 8px; flex: 1; align-content: start; }
.offer-body h3 { margin: 0; font: 700 19px/1.25 var(--cs-display); }
.offer-body p { margin: 0; font-size: 15px; color: #2c4458; }
.offer-facts { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 4px 0 0; font-size: 14px; }
.offer-facts dt { color: var(--cs-muted); }
.offer-facts dd { margin: 0; font-weight: 600; }
.offer-kind { font-size: 13px; font-weight: 700; color: var(--cs-muted); }
.offer-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.offer-filters button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--cs-line); background: #fff; font: 600 14px var(--cs-body); color: var(--cs-ink); cursor: pointer; }
.offer-filters button[aria-pressed="true"] { background: var(--cs-ink); border-color: var(--cs-ink); color: #fff; }
.offer-dialog dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.offer-dialog dt { color: var(--cs-muted); font-weight: 700; font-size: 14px; }
.offer-dialog dd { margin: 0; }

.pub-foot { padding: 32px 0 48px; border-top: 1px solid var(--cs-line); font-size: 15px; color: var(--cs-muted); }
.pub-foot a { color: var(--cs-ink); font-weight: 600; }

/* Imagens de editais e comunicados */
.bolsa-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin: 0 0 12px; background: #eef2f5; }
.bolsa-img.grande { aspect-ratio: auto; max-height: 420px; object-fit: contain; margin-bottom: 16px; }
.com-img { display: block; width: 100%; max-width: 560px; max-height: 320px; object-fit: cover; border-radius: 10px; margin: 0 0 10px; }
