:root {
  color-scheme: light;
  --navy: #142c48;
  --ink: #20344b;
  --muted: #526173;
  --gold: #e0bd69;
  --gold-ink: #76551b;
  --paper: #faf9f6;
  --white: #ffffff;
  --line: #d9dfe3;
  --error: #9c2536;
  --success: #235a42;
  --display: Georgia, "Times New Roman", serif;
  --body: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; scrollbar-color: var(--muted) var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--body); }
::selection { background: var(--gold); color: var(--navy); }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: .22em; overflow-wrap: anywhere; }
a:hover { color: var(--gold-ink); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--gold-ink); outline-offset: 4px; }
input, textarea { caret-color: var(--navy); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; text-wrap: balance; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 4.8vw, 4.6rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.8rem, 2.6vw, 2.7rem); margin-bottom: 1.5rem; letter-spacing: -.02em; }
h3 { font-size: 1.3rem; line-height: 1.4; font-weight: 600; }
p { max-width: 72ch; }
img { max-width: 100%; height: auto; }
.skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 20; padding: .8rem 1.2rem; color: var(--navy); background: var(--gold); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.site-header { min-height: 88px; padding: 1rem clamp(1.25rem, 4vw, 4rem); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; background: var(--white); border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; flex-shrink: 0; }
.site-header nav { display: flex; align-items: center; justify-content: end; gap: clamp(1rem, 2vw, 1.75rem); }
.site-header nav a { font-size: .93rem; text-decoration: none; padding: .6rem 0; }
.site-header nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--gold-ink); text-decoration-thickness: 2px; }
.site-header nav .nav-portal { border: 1px solid var(--navy); padding: .65rem 1.1rem; }
.site-header nav .nav-portal:hover { background: var(--navy); color: var(--white); }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.site-header .nav-login { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; background: var(--navy); color: var(--white); border: 1px solid var(--navy); padding: .65rem 1.1rem; font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; border-radius: 2px; }
.site-header .nav-login:hover { background: var(--gold); color: var(--navy); }
.menu-toggle { border: 1px solid var(--navy); background: var(--white); color: var(--navy); padding: .6rem 1rem; min-height: 44px; }
.institution-hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 4vw, 4rem); background: var(--navy); color: var(--white); padding: clamp(3rem, 5vw, 5rem) max(1.25rem, calc((100vw - 1216px) / 2)); align-items: center; border-bottom: 1px solid var(--gold); }
.hero-title h1 { max-width: 24ch; font-size: clamp(2.5rem, 4.3vw, 4.25rem); margin-bottom: 1.5rem; line-height: 1.13; }
.hero-title > p { color: #d5dfe9; max-width: 53ch; font-size: 1.1rem; }
.hero-period { color: var(--gold); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; }
.hero-link { color: #f0d692; }
.hero-link:hover { color: var(--white); }
.hero-register { padding: 2rem; background: var(--paper); color: var(--navy); border-top: 1px solid var(--gold); font-size: .95rem; border-radius: 2px; }
.hero-register strong { display: block; font-family: var(--display); font-size: 3rem; font-weight: 400; line-height: 1.2; margin-bottom: .6rem; }
.hero-register p { margin-bottom: 1.5rem; color: var(--muted); font-size: .9rem; }
.hero-register dl { margin: 0; display: grid; gap: 1rem; }
.hero-register dt { color: var(--muted); font-size: .78rem; font-weight: 400; }
.hero-register dd { font-variant-numeric: tabular-nums; font-size: .95rem; }
.hero-register a { display: inline-block; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); width: 100%; font-size: .86rem; font-weight: 600; }
.button { display: inline-flex; justify-content: center; align-items: center; padding: .85rem 1.4rem; border: 1px solid transparent; min-height: 48px; line-height: 1.3; font-weight: 600; cursor: pointer; text-decoration: none; border-radius: 2px; }
.button-gold { background: var(--gold); color: var(--navy); }
.button-gold:hover { background: #eed296; color: var(--navy); }
.button-navy { background: var(--navy); color: var(--white); }
.button-navy:hover { background: #284766; color: var(--white); }
.button-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
button:disabled { cursor: wait; opacity: .65; }
.institution-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); max-width: 1320px; margin: 0 auto; padding: 4rem clamp(1.25rem, 4vw, 3rem); }
.section-index { align-self: start; display: grid; gap: .3rem; position: sticky; top: 2rem; }
.section-index { border-top: 2px solid var(--gold); padding-top: 1.3rem; }
.section-index strong { margin-bottom: 1rem; font-weight: 600; }
.section-index a { padding: .4rem 0; text-decoration: none; font-size: .93rem; }
.section-index a:hover { text-decoration: underline; }
.editorial-section { padding: 3rem 0; border-top: 1px solid var(--line); scroll-margin-top: 2rem; }
.editorial-section:first-child { padding-top: 0; border-top: 0; }
.section-pending { padding: 1.8rem 0; }
.section-pending h2 { font-size: 1.65rem; margin-bottom: .5rem; }
.section-pending .empty-state { padding: .2rem 0; margin-bottom: 0; font-size: .95rem; }
.section-pending .updated { margin-top: .4rem; font-size: .78rem; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1.5rem; }
.text-link { font-size: .93rem; font-weight: 600; }
.empty-state { color: var(--muted); padding: 1.5rem 0; margin-bottom: .5rem; }
.updated, .catalog-note, .form-help { font-size: .85rem; color: var(--muted); }
.updated { margin-top: 1.2rem; }
.notice { background: #f0e9d9; color: #62461a; padding: 1rem; }
.publication-list { list-style: none; margin: 0; padding: 0; }
.publication-entry { padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.publication-entry:first-child { padding-top: 1rem; }
.publication-entry h3 { margin: .6rem 0; }
.publication-entry h3 a { text-decoration: none; }
.publication-entry h3 a:hover { text-decoration: underline; }
.publication-entry p { margin-bottom: 1rem; color: var(--muted); overflow-wrap: anywhere; }
.entry-info { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; color: var(--muted); font-size: .85rem; }
.entry-details { display: flex; flex-wrap: wrap; gap: .65rem 1.5rem; margin: 0 0 1rem; font-size: .85rem; }
.entry-details div { max-width: 100%; }
dt { font-weight: 600; }
dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
.registration { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 2rem; margin: 0; }
.registration > div { padding: .3rem 0 1.1rem; border-bottom: 1px solid var(--line); }
.registration dt { font-size: .85rem; color: var(--muted); font-weight: 400; }
.registration dd { font-size: 1rem; }
.contact-section > p { margin-bottom: 1.25rem; }
.contact-section { background: var(--white); padding: 2rem; border: 1px solid var(--line); margin-top: 2rem; border-radius: 2px; }
.contact-form { max-width: 760px; }
label { display: block; color: var(--ink); font-size: .9rem; font-weight: 600; }
input:not([type=checkbox]):not([type=hidden]), select, textarea { display: block; width: 100%; background: var(--white); border: 1px solid #8795a3; border-radius: 2px; min-height: 46px; padding: .65rem .75rem; color: var(--ink); margin-top: .35rem; font-weight: 400; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { resize: vertical; }
.contact-form > label { margin-top: 1.2rem; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-help { margin: .35rem 0 1rem; }
.consent { display: flex; align-items: start; gap: .75rem; margin-bottom: 1.5rem; font-weight: 400; }
.consent input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--navy); margin-top: .2rem; }
.contact-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-status { margin: 1rem 0 0; }
[data-state=error] { color: var(--error); }
[data-state=success] { color: var(--success); }
.portal-heading { padding: 4rem clamp(1.25rem, 5vw, 5rem) 3rem; max-width: 1320px; margin: auto; }
.portal-heading h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); margin-bottom: 1.2rem; }
.portal-heading p { color: var(--muted); font-size: 1.05rem; }
.portal-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); max-width: 1320px; padding: 0 clamp(1.25rem, 5vw, 5rem) 5rem; margin: auto; gap: 3rem; }
.portal-layout > *, .institution-layout > *, .filters label, .contact-form label { min-width: 0; }
.portal-index { max-width: 100%; }
.filters input, .filters select, .contact-form input:not([type=checkbox]), .contact-form textarea { min-width: 0; max-width: 100%; }
.portal-index nav { display: grid; align-content: start; font-size: .93rem; border-top: 1px solid var(--line); }
.portal-index a { padding: .7rem .5rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.portal-index a[aria-current] { background: var(--navy); color: var(--white); }
.portal-content { min-width: 0; }
.portal-content > section > h2 { font-family: var(--body); font-size: 1.6rem; font-weight: 600; }
.filters { background: var(--white); border: 1px solid var(--line); border-top: 2px solid var(--gold); padding: 1.5rem; border-radius: 2px; }
.filter-search { display: grid; grid-template-columns: 3fr 2fr; gap: 1rem; }
.filter-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; margin-top: 1.3rem; }
.filter-actions a { font-size: .9rem; }
.results-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: baseline; margin: 2rem 0 1rem; }
.results-toolbar p { margin-bottom: 0; font-variant-numeric: tabular-nums; }
.export-actions { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .85rem; }
#catalog-status:empty { margin: 0; }
#catalog-status { margin: .8rem 0; }
.pagination { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; padding: 1.5rem 0; font-size: .93rem; font-variant-numeric: tabular-nums; }
.portal-content #cadastro { margin-top: 3rem; }
.detail-layout { max-width: 1060px; margin: auto; padding: 3rem clamp(1.25rem, 5vw, 4rem) 6rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 3rem; color: var(--muted); font-size: .9rem; }
.publication-detail h1 { font-size: clamp(2rem, 4vw, 3.7rem); overflow-wrap: anywhere; }
.detail-category { color: var(--muted); margin: 0 0 1rem; }
.detail-summary { color: var(--muted); font-size: 1.15rem; }
.detail-metadata { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.6rem 0; margin: 2rem 0; font-size: .9rem; }
.detail-metadata dt { color: var(--muted); font-weight: 400; }
.published-content { max-width: 72ch; overflow-wrap: anywhere; }
.published-content h2, .published-content h3 { margin-top: 2.5rem; }
.published-content table { display: block; max-width: 100%; overflow: auto; border-collapse: collapse; }
.published-content th, .published-content td { padding: .6rem; border: 1px solid var(--line); }
.published-content pre { overflow: auto; padding: 1rem; background: #eef1f3; }
.published-content iframe { display: none; }
.attachment-section { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.attachment-list { padding: 0; list-style: none; }
.attachment-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.attachment-list a { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-weight: 600; }
.attachment-action, .attachment-type { font-size: .85rem; font-weight: 400; }
.attachment-type { display: block; color: var(--muted); margin-top: .3rem; }
.unavailable { padding: 2rem 0 4rem; }
.site-footer { display: flex; justify-content: space-between; gap: 3rem; padding: 3.5rem clamp(1.25rem, 5vw, 5rem); background: var(--navy); color: #d5dfe9; }
.site-footer strong { color: var(--white); font: 2rem var(--display); }
.site-footer p { font-size: .9rem; margin: .65rem 0; }
.site-footer nav { display: grid; gap: .7rem; align-content: start; font-size: .9rem; }
.site-footer a { color: #f0d692; }
.site-footer a:hover { color: var(--white); }
@media (min-width: 1024px) and (max-width: 1150px) {
  .site-header { gap: 1rem; padding-inline: 1.5rem; }
  .site-header nav { gap: 1rem; }
  .wordmark img { width: 148px; }
}
@media (max-width: 1023px) {
  .site-header { grid-template-columns: 1fr auto; gap: 1rem; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; justify-content: start; flex-wrap: wrap; padding-top: .75rem; border-top: 1px solid var(--line); }
  .site-header nav a { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 1000px) {
  .institution-hero { gap: 2rem; grid-template-columns: 2.5fr 1fr; }
  .institution-layout { grid-template-columns: 170px minmax(0, 1fr); gap: 2rem; }
  .portal-layout { grid-template-columns: 195px minmax(0, 1fr); gap: 1.5rem; }
  .site-header { gap: 1rem; }
  .site-header nav { gap: 1rem; }
  .detail-metadata { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; min-height: 82px; padding: 1rem 1.25rem; }
  .wordmark img { width: 148px; }
  .menu-toggle { display: inline-flex; }
  .site-header nav { width: 100%; flex-wrap: wrap; justify-content: start; gap: .35rem 1.5rem; }
  .site-header nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .institution-hero { grid-template-columns: 1fr; padding: 3rem 1.25rem; gap: 2.5rem; }
  .hero-title h1 { font-size: clamp(2.5rem, 7vw, 3.7rem); }
  .hero-register { display: block; padding: 1.5rem; }
  .hero-register strong { font-size: 2rem; }
  .hero-register dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-register dl > div:first-child { grid-column: 1 / -1; }
  .hero-register a { margin-top: 1.25rem; }
  .institution-layout { grid-template-columns: 1fr; padding: 2rem 1.25rem; }
  .section-index { position: static; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
  .section-index strong { width: 100%; margin: 0; }
  .editorial-section { padding: 2.5rem 0; }
  .section-pending { padding: 1.5rem 0; }
  .contact-section { padding: 1.25rem; }
  .section-heading { margin-bottom: 1rem; }
  .section-heading h2 { width: 100%; margin-bottom: .5rem; }
  .portal-heading { padding: 2.5rem 1.25rem 2rem; }
  .portal-layout { grid-template-columns: minmax(0, 1fr); padding: 0 1.25rem 3rem; }
  .portal-index nav { display: flex; min-width: 0; max-width: 100%; overflow-x: auto; padding-bottom: .6rem; align-items: stretch; }
  .portal-index a { flex-shrink: 0; max-width: 230px; padding: .6rem 1rem; border: 1px solid var(--line); }
  .filter-search { grid-template-columns: 1fr; }
  .filters { padding: 1.2rem; }
  .registration { column-gap: 1rem; }
  .site-footer { flex-direction: column; gap: 1.5rem; padding: 2.5rem 1.25rem; }
}
@media (max-width: 440px) {
  .site-header { gap: .5rem; padding-inline: 1rem; }
  .wordmark img { width: 105px; }
  .header-actions { gap: .45rem; }
  .site-header .nav-login { padding: .6rem .65rem; font-size: .78rem; }
  .menu-toggle { padding: .6rem .65rem; font-size: .8rem; }
  .form-pair, .filter-fields, .registration, .detail-metadata { grid-template-columns: 1fr; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 1rem; }
  .hero-link { text-align: center; padding: .5rem; }
  .detail-layout { padding-top: 2rem; }
  .entry-info { flex-direction: column; gap: .1rem; }
}
@media (max-width: 360px) {
  /* O nome da instituição e as duas ações não cabem na mesma linha a 320px. */
  .site-header { grid-template-columns: minmax(0, 1fr); }
  .header-actions { grid-column: 1; grid-row: 2; justify-content: space-between; }
  .site-header nav { grid-column: 1; grid-row: 3; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: var(--white); }
  .site-header, .site-footer, .section-index, .portal-index, .filters, .export-actions, .pagination, .contact-form, .skip-link { display: none; }
  .portal-layout, .institution-layout { display: block; padding: 0; }
  .institution-hero { background: var(--white); color: var(--navy); padding: 0; }
  a { color: var(--ink); }
  .publication-entry { break-inside: avoid; }
}
