.home-content-shell {
  box-sizing: border-box;
}

.mley-visits-badge {
  font-size: 14px;
}

.mley-home-catalog-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.mley-home-catalog-copy {
  min-width: 0;
}

.mley-home-catalog-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f2a37;
}

.mley-home-catalog-summary {
  margin-top: 0.2rem;
  color: #667789;
  font-size: 0.76rem;
}

.mley-home-catalog-form {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.mley-home-catalog-input-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: min(100%, 320px);
  padding: 0 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--bg-surface);
}

.mley-home-catalog-input-shell i {
  color: #8a97a5;
}

.mley-home-catalog-input-shell .form-control {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  min-height: 2.5rem;
  padding: 0 !important;
}

.mley-home-catalog-empty {
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  padding: 1.4rem 1rem;
  border: 1px dashed var(--border-color);
  border-radius: 18px;
  background: #fbfcfe;
  color: var(--text-muted);
  text-align: center;
}

.mley-home-network-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1.1rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(222, 62, 128, 0.12), transparent 36%),
    linear-gradient(135deg, #f8fbff 0%, #eef4fb 100%);
}

.mley-home-network-banner__eyebrow {
  margin: 0 0 0.25rem;
  color: #5f6b7a;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mley-home-network-banner__copy h2 {
  margin: 0;
  font-size: 1.05rem;
}

.mley-home-network-banner__copy p {
  margin: 0.35rem 0 0;
  color: #667789;
  font-size: 0.84rem;
  line-height: 1.55;
}

.mley-home-network-banner__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.75rem 1rem;
  border: 1px solid #cfe0fb;
  border-radius: 999px;
  background: #edf4ff;
  color: #2253a4;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mley-home-network-banner__cta:hover,
.mley-home-network-banner__cta:focus {
  background: #dfeeff;
  border-color: #b7cff8;
  color: #173d80;
  text-decoration: none;
}

#mley-home-laws-table {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0 0.78rem;
}

#mley-home-laws-table thead th {
  padding: 0 0.8rem 0.3rem;
  background: transparent;
  color: #667789;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#mley-home-laws-table tbody td {
  padding: 0.92rem 0.85rem;
  vertical-align: middle;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

#mley-home-laws-table tbody td:first-child {
  border-left: 1px solid var(--border-color);
  border-radius: 18px 0 0 18px;
}

#mley-home-laws-table tbody td:last-child {
  border-right: 1px solid var(--border-color);
  border-radius: 0 18px 18px 0;
}

.mley-home-law-link {
  display: block;
  color: inherit;
}

.mley-home-law-rank-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  height: 2rem;
  padding: 0 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: linear-gradient(135deg, #f8fafc 0%, #eef3f9 100%);
  color: #273445;
  font-size: 0.78rem;
  font-weight: 700;
}

.mley-home-law-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.mley-home-law-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 1.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: #f8fafc;
  color: #425468;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mley-home-law-status::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #6f9779;
}

.mley-home-law-date {
  font-size: 0.76rem;
  font-weight: 600;
  color: #667789;
  white-space: nowrap;
}

.mley-home-law-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.mley-home-law-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.mley-home-law-graph-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  border: 1px solid #cfe0fb;
  background: #edf4ff;
  color: #2253a4;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mley-home-law-subtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.28rem;
  font-size: 0.76rem;
  color: #667789;
}

.mley-home-law-key {
  font-family: "Comfortaa", sans-serif;
  font-weight: 700;
  color: var(--brand-color);
}

.mley-home-law-divider {
  color: #b4bfcc;
}

.mley-home-law-views-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2rem;
  padding: 0 0.82rem;
  border-radius: 999px;
  background: #f5f8fc;
  border: 1px solid var(--border-color);
  color: #425468;
  font-size: 0.76rem;
  font-weight: 700;
}

.mley-home-law-actions-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.mley-home-law-action {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0 !important;
  border-radius: 999px !important;
}

.mley-home-pagination-shell {
  margin-top: 0.9rem;
}

.mley-home-pagination-summary {
  margin-bottom: 0.75rem;
  color: #667789;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.mley-home-pagination {
  margin-bottom: 0;
  gap: 0.2rem;
}

.project-portada {
  border-top: 4px solid var(--brand-color);
  background: linear-gradient(135deg, #ffffff 0%, #fff7fb 100%);
}

.project-portada__eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background-color: #f7e5ef;
  color: #9e2f67;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-portada__title {
  margin-bottom: 0.85rem;
}

.project-portada__meta {
  margin: 1rem 0 0.75rem;
}

.project-portada__meta .badge {
  margin-right: 0.45rem;
  margin-bottom: 0.45rem;
}

.project-portada__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

@media only screen and (min-width: 1081px) {
  .home-content-shell {
    width: min(66vw, 900px) !important;
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

@media only screen and (max-width: 1080px) {
  .home-content-shell {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (max-width: 767.98px) {
  .mley-home-catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .mley-home-catalog-form {
    width: 100%;
    justify-content: stretch;
  }

  .mley-home-catalog-form .btn {
    flex: 1 1 0;
  }

  .mley-home-catalog-input-shell {
    width: 100%;
    min-width: 0;
  }

  #mley-home-laws-table thead {
    display: none !important;
  }

  #mley-home-laws-table,
  #mley-home-laws-table tbody,
  #mley-home-laws-table td {
    display: block;
    width: 100%;
  }

  #mley-home-laws-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "rank rank"
      "name name"
      "views actions";
    gap: 0.45rem 0.75rem;
    margin: 0 0 0.9rem 0;
    padding: 0.8rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-surface);
    box-shadow: 0 10px 22px rgba(5, 45, 73, 0.08);
  }

  #mley-home-laws-table tbody td {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  #mley-home-laws-table .mley-home-law-rank {
    grid-area: rank;
  }

  #mley-home-laws-table .mley-home-law-name {
    grid-area: name;
  }

  #mley-home-laws-table .mley-home-law-views {
    grid-area: views;
    justify-self: start;
  }

  #mley-home-laws-table .mley-home-law-actions {
    grid-area: actions;
  }

  .mley-home-network-banner {
    flex-direction: column;
    align-items: stretch;
  }
}

:root[data-theme="dark"] .mley-home-network-banner,
:root[data-theme="dark"] #mley-home-laws-table tbody td,
:root[data-theme="dark"] .project-portada {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-2) 100%);
  border-color: var(--border-color);
}

:root[data-theme="dark"] .mley-home-network-banner__copy p,
:root[data-theme="dark"] .mley-home-catalog-summary,
:root[data-theme="dark"] .mley-home-law-date,
:root[data-theme="dark"] .mley-home-law-subtitle,
:root[data-theme="dark"] .mley-home-pagination-summary {
  color: var(--text-muted);
}
