.diario-list-header {
  padding: 16px 20px;
  background: #f7fbf7;
  border-bottom: 1px solid #e2ece2;
}

.diario-list-title {
  color: var(--g2);
  font-family: "Barlow", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.diario-empty-cell {
  padding: 28px 20px !important;
  color: var(--txt2);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

#gallery-modal,
#mo-lei-view {
  z-index: 10000 !important;
}

.public-modal-close {
  min-width: 44px !important;
  min-height: 44px !important;
}

.public-menu-btn {
  display: none;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid #2a6b2a;
  border-radius: 6px;
  background: #0d3b0d;
  color: #fff;
  font: 700 22px/1 "Barlow", sans-serif;
  cursor: pointer;
}

.public-menu-btn:focus-visible {
  outline: 3px solid #f5c518;
  outline-offset: 3px;
}

.mnl[data-public-nav] a:focus-visible {
  outline: 3px solid #f5c518;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .home-modules,
  .mod-grid,
  .sec-grid,
  .obras-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .ftg {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body.public-nav-open {
    overflow: hidden;
  }

  .public-menu-btn {
    display: inline-flex;
    flex: 0 0 44px;
    width: 44px !important;
    height: 44px !important;
  }

  .mainnav .mn-in,
  .public-news-page .mn-in {
    position: relative;
    min-height: 64px;
    padding: 0 16px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .mn-logo {
    min-width: 0;
  }

  .mn-logo img {
    width: auto;
    height: 46px !important;
    max-width: 132px;
  }

  .mn-logo span {
    font-size: 18px;
    line-height: 1;
  }

  .mnl[data-public-nav] {
    display: flex !important;
    position: static;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    background: rgba(6, 18, 6, 0.98);
  }

  .public-nav-ready .mnl[data-public-nav] {
    display: none !important;
    position: fixed;
    top: 64px;
    right: 0;
    left: 0;
    z-index: 150;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    padding: 8px 12px calc(12px + env(safe-area-inset-bottom));
    border-bottom: 2px solid #1a4a1a;
    background: rgba(6, 18, 6, 0.99);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  }

  .mnl[data-public-nav] a {
    display: flex;
    width: 100%;
    height: auto !important;
    min-height: 44px;
    padding: 12px 14px !important;
    border-bottom: 1px solid #153015 !important;
    font-size: 13px !important;
  }

  .public-nav-ready .mnl[data-public-nav].is-open {
    display: flex !important;
  }

  .hero {
    min-height: 410px !important;
    padding: 44px 0 32px !important;
  }

  .hcont {
    padding: 0 16px !important;
    align-items: center !important;
  }

  .hey {
    gap: 8px;
    letter-spacing: 4px;
    line-height: 1.45;
  }

  .hh1,
  .ih-title,
  .ih-desc {
    overflow-wrap: anywhere;
  }

  .hh2 {
    margin-bottom: 24px;
    line-height: 1.4;
  }

  .srch input,
  input,
  select,
  textarea {
    min-width: 0;
    font-size: 16px !important;
  }

  .srch button {
    flex: 0 0 56px;
    min-height: 48px;
  }

  .hchips,
  .ih-pills {
    align-items: stretch;
  }

  .hchip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .cc-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 16px;
    text-align: center;
  }

  .oc-meta button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }

  .stats .sts-in {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .stats .st {
    min-width: 0;
    min-height: 72px;
    padding: 13px 12px !important;
  }

  .stats .st:last-child {
    grid-column: 1 / -1;
  }

  .stnum,
  .stlbl {
    overflow-wrap: anywhere;
  }

  .home-modules,
  .mod-grid,
  .sec-grid,
  .obras-grid,
  .ouv-grid,
  .contato-grid,
  .cg,
  .g2,
  .g3,
  .gm,
  .tg-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .mod,
  .mod-body,
  .card,
  .ouv-card,
  .oc {
    min-width: 0;
  }

  .mod-title,
  .mod-cta,
  .ouv-title,
  .oc-nome {
    overflow-wrap: anywhere;
  }

  .inner-hero {
    padding: 30px 0 24px !important;
  }

  .ih-in {
    padding: 0 16px !important;
  }

  .ih-desc {
    font-size: 13px !important;
    line-height: 1.65;
  }

  .ih-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    white-space: normal;
  }

  .ouv-btn,
  .etab-btn,
  .btn,
  .back,
  .ih-back {
    min-height: 44px;
    align-items: center;
  }

  .ouv-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 14px;
    text-align: center;
  }

  #pg-ouvidoria div[style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .em-tabs {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .em-body {
    min-width: 0;
    padding: 16px !important;
  }

  .ftg {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .ftbot {
    padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
  }

  .tw::after,
  .dtw > div[style*="overflow-x:auto"]::after {
    content: "Deslize para ver mais";
    display: block;
    padding: 8px 12px;
    color: var(--txt2);
    background: #f7faf7;
    font-size: 11px;
    text-align: right;
  }

  .public-news-page .wrap {
    padding-right: 16px;
    padding-left: 16px;
  }

  .public-news-page .hero {
    min-height: 0 !important;
    padding: 36px 0 30px !important;
  }

  .public-news-page h1 {
    font-size: clamp(30px, 10vw, 42px);
    overflow-wrap: anywhere;
  }

  .public-news-page .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-news-page .article,
  .public-news-page .side {
    min-width: 0;
  }

  .public-news-page .article-body {
    padding: 22px 18px;
  }

  .public-news-page .summary {
    padding-left: 14px;
    font-size: 17px;
  }

  .public-news-page .content {
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.75;
  }

  .public-news-page .cover {
    height: auto;
    min-height: 220px;
    aspect-ratio: 16 / 9;
  }

  .public-news-page .btn {
    flex: 1 1 140px;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .mainnav .mn-in,
  .public-news-page .mn-in {
    flex-wrap: wrap;
    height: auto;
    min-height: 72px;
    padding: 8px 18px 0;
  }

  .mnl[data-public-nav] {
    display: flex;
    order: 3;
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .mnl[data-public-nav] a {
    flex: 0 0 auto;
    height: 48px;
  }
}

@media (max-width: 640px) {
  #lei-table-pub,
  #diario-public-table {
    display: block;
    width: 100%;
    min-width: 0 !important;
    border: 0;
  }

  #lei-table-pub thead,
  #diario-public-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  #lei-table-pub tbody,
  #diario-public-table tbody {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  #lei-table-pub tr,
  #diario-public-table tr {
    display: block;
    overflow: hidden;
    border: 1px solid #dfe9df;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0, 60, 0, .06);
  }

  #lei-table-pub td,
  #diario-public-table td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    width: 100%;
    padding: 10px 12px !important;
    border: 0;
    border-bottom: 1px solid #edf2ed;
    overflow-wrap: anywhere;
    white-space: normal !important;
  }

  #lei-table-pub td:last-child,
  #diario-public-table td:last-child {
    border-bottom: 0;
  }

  #lei-table-pub td::before,
  #diario-public-table td::before {
    color: #607060;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .6px;
    line-height: 1.5;
    text-transform: uppercase;
  }

  #lei-table-pub td:nth-child(1)::before { content: "Numero"; }
  #lei-table-pub td:nth-child(2)::before { content: "Tipo"; }
  #lei-table-pub td:nth-child(3)::before { content: "Data"; }
  #lei-table-pub td:nth-child(4)::before { content: "Ementa"; }
  #lei-table-pub td:nth-child(5)::before { content: "Situacao"; }
  #lei-table-pub td:nth-child(6)::before { content: "Texto"; }
  #diario-public-table td::before { content: attr(data-label); }

  #lei-table-pub td button,
  #diario-public-table td a,
  #diario-public-table td .diario-file {
    width: 100%;
    min-height: 44px;
  }

  #lei-table-pub td button {
    justify-content: center;
  }

  #diario-public-table .diario-empty-row {
    display: block;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #diario-public-table .diario-empty-cell {
    display: block;
    padding: 28px 18px !important;
    border: 0;
    text-align: center;
  }

  #diario-public-table .diario-empty-cell::before {
    content: none;
  }

  .diario-list-title {
    font-size: 17px;
  }

  .public-modal-card {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    margin: 12px auto !important;
    border-radius: 10px !important;
  }

  .gallery-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .law-view-card {
    overflow-y: auto !important;
  }

  .law-view-card > :first-child {
    position: sticky !important;
    top: 0;
    z-index: 1;
  }

  .law-action-bar {
    align-items: stretch !important;
    padding: 12px !important;
  }

  .law-action-bar > button {
    flex: 1 1 100%;
    min-height: 44px;
    justify-content: center;
  }

  .law-action-bar > div {
    width: 100%;
    margin-left: 0 !important;
    line-height: 1.5;
  }

  .law-view-body {
    padding: 22px 16px !important;
  }

  #pg-legislacao .dtw > div[style*="overflow-x:auto"]::after,
  .diario-list-shell::after {
    display: none;
  }

  #a11y-panel {
    width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
  }
}

@media (max-width: 400px) {
  .stats .sts-in {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .stats .st:last-child {
    grid-column: 1 / -1;
  }

  .mn-logo img {
    height: 42px !important;
    max-width: 116px;
  }

  .hh1 {
    font-size: 25px !important;
  }

  .wrap {
    padding-right: 12px !important;
    padding-left: 12px !important;
  }

  .public-news-page .article-body {
    padding: 20px 15px;
  }
}
