/* Página /portarias: busca, filtro por ano e lista de atos com download. */
.acts-hero { padding: 2.6rem 0 1.6rem; background: linear-gradient(180deg, var(--surface) 0%, #fff 100%); }
.acts-hero h1 { margin: .35rem 0 .5rem; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; color: var(--ink-brand); }
.acts-hero > .container > p { max-width: 46rem; margin: 0; color: var(--muted); font-size: var(--fs-base); line-height: 1.55; }

.acts-search { display: flex; align-items: center; gap: .6rem; max-width: 40rem; margin: 1.4rem 0 1rem; padding: .35rem .35rem .35rem 1rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.acts-search:focus-within { border-color: var(--green, var(--brand-700)); box-shadow: 0 0 0 3px rgba(8, 123, 97, .18); }
.acts-search .site-icon { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.acts-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: var(--fs-base); background: transparent; color: var(--ink-brand); }
.acts-search button { border: 0; border-radius: var(--radius-sm); padding: .7rem 1.1rem; background: var(--green, var(--brand-700)); color: #fff; font-weight: 800; cursor: pointer; }
.acts-search button:hover { background: var(--brand-750); }

.acts-years { display: flex; flex-wrap: wrap; gap: .4rem; }
.acts-years a { padding: .38rem .75rem; border-radius: var(--radius-pill); border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: var(--fs-md); font-weight: 700; text-decoration: none; }
.acts-years a:hover { border-color: var(--green, var(--brand-700)); color: var(--green, var(--brand-700)); }
.acts-years a.is-active { background: var(--green, var(--brand-700)); border-color: var(--green, var(--brand-700)); color: #fff; }

.acts-list-section { padding: 1rem 0 3rem; }
.acts-count { margin: 0 0 1.4rem; color: var(--muted); }
.acts-count a { color: var(--green, var(--brand-700)); font-weight: 700; }

.acts-year + .acts-year { margin-top: 2.2rem; }
.acts-year h2 { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .9rem; padding-bottom: .5rem; border-bottom: 2px solid var(--line-soft); color: var(--ink-brand); font-size: var(--fs-2xl); }
.acts-year h2 small { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); background: var(--surface-2); border-radius: var(--radius-pill); padding: .15rem .55rem; }

.acts-list { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.act { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 1rem; align-items: start; padding: 1rem 1.1rem; border: 1px solid var(--line-soft); border-radius: var(--radius-md); background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease; scroll-margin-top: 110px; }
.act:hover, .act:target { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.act:target { outline: 3px solid rgba(8, 123, 97, .25); }
.act__number { display: grid; place-items: center; align-content: center; width: 64px; height: 64px; border-radius: var(--radius-md); background: var(--surface); color: var(--green, var(--brand-700)); line-height: 1; }
.act__number span { font-size: var(--fs-xs); font-weight: 800; letter-spacing: .05em; }
.act__number strong { font-size: var(--fs-2xl); }
.act__body h3 { margin: 0 0 .25rem; font-size: var(--fs-base); color: var(--ink-brand); }
.act__summary { margin: 0 0 .4rem; color: var(--ink-2); line-height: 1.55; }
.act__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.act__meta .site-icon { width: 16px; height: 16px; }
.act__text { margin-top: .5rem; }
.act__text summary { cursor: pointer; color: var(--green, var(--brand-700)); font-weight: 700; font-size: var(--fs-md); }
.act__text > div { margin-top: .6rem; padding: .9rem 1rem; border-radius: var(--radius-md); background: var(--surface); color: var(--ink-2); font-size: var(--fs-md); line-height: 1.6; max-height: 26rem; overflow: auto; }
.act__actions { align-self: center; }
.act__download { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem .85rem; border-radius: var(--radius-md); border: 1px solid var(--line); color: var(--ink-brand); font-weight: 800; font-size: var(--fs-md); text-decoration: none; white-space: nowrap; }
.act__download:hover { background: var(--green, var(--brand-700)); border-color: var(--green, var(--brand-700)); color: #fff; }
.act__download .site-icon { width: 18px; height: 18px; }
.act__download small { display: block; font-size: var(--fs-xs); font-weight: 600; opacity: .75; }
.act__missing { font-size: var(--fs-sm); color: #8a6d00; background: #fff6da; border-radius: var(--radius-sm); padding: .3rem .55rem; }

.acts-empty { padding: 2rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius-md); color: var(--muted); }

@media (max-width: 760px) {
    .act { grid-template-columns: 52px minmax(0, 1fr); }
    .act__number { width: 52px; height: 52px; }
    .act__number strong { font-size: var(--fs-xl); }
    .act__actions { grid-column: 2; }
    .acts-search button { padding: .65rem .8rem; }
}

/* ---------- Pastas por ano ---------- */
.acts-crumbs { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-md); font-weight: 700; color: var(--muted); }
.acts-crumbs a { display: inline-flex; align-items: center; gap: .3rem; color: var(--green, var(--brand-700)); text-decoration: none; }
.acts-crumbs a:hover { text-decoration: underline; }
.acts-crumbs .site-icon { width: 16px; height: 16px; }

.acts-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.acts-folder { position: relative; display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: 1.1rem 1.1rem 1rem; border: 1px solid var(--line-soft); border-radius: var(--radius-md);
    background: #fff; color: var(--ink-brand); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.acts-folder:hover, .acts-folder:focus-visible { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.acts-folder:focus-visible { outline: 3px solid rgba(8, 123, 97, .35); outline-offset: 2px; }
.acts-folder strong { margin-top: .55rem; font-size: var(--fs-2xl); line-height: 1; }
.acts-folder__count { font-weight: 700; color: var(--ink-2); }
.acts-folder__last { font-size: var(--fs-sm); color: var(--muted); }
/* Ícone de pasta em CSS: aba + corpo; a folha sobe um pouco no hover. */
.acts-folder__icon { position: relative; width: 52px; height: 40px; }
.acts-folder__icon::before { content: ""; position: absolute; left: 0; top: 0; width: 22px; height: 10px; border-radius: 4px 4px 0 0; background: #e3b341; }
.acts-folder__icon::after { content: ""; position: absolute; z-index: 2; left: 0; right: 0; top: 12px; bottom: 0; border-radius: 3px 8px 8px 8px; background: linear-gradient(160deg, #f6cf5b, #e3a92b); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .06); }
.acts-folder__icon span { position: absolute; z-index: 1; left: 6px; right: 6px; top: 5px; height: 24px; border-radius: var(--radius-xs); background: #fff; box-shadow: var(--shadow-sm);
    transition: transform .2s ease; }
.acts-folder__icon span::before, .acts-folder__icon span::after { content: ""; position: absolute; left: 6px; right: 10px; height: 2px; border-radius: var(--radius-xs); background: var(--line); }
.acts-folder__icon span::before { top: 4px; }
.acts-folder__icon span::after { top: 8px; right: 18px; }
.acts-folder:hover .acts-folder__icon span, .acts-folder:focus-visible .acts-folder__icon span { transform: translateY(-5px); }

.acts-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 2px solid var(--line-soft); }
.acts-pager a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; color: var(--green, var(--brand-700)); text-decoration: none; }
.acts-pager a:hover { text-decoration: underline; }
.acts-pager a[rel="next"] { justify-self: end; }
.acts-pager .site-icon { width: 18px; height: 18px; }
.acts-pager__all { padding: .5rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-pill); }

@media (prefers-reduced-motion: reduce) {
    .acts-folder, .acts-folder__icon span { transition: none; }
}

@media (max-width: 640px) {
    .acts-folders { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
    .acts-folder { padding: .85rem .85rem .8rem; }
    .acts-folder strong { font-size: var(--fs-xl); }
    .acts-folder__icon { transform: scale(.85); transform-origin: left top; }
}
