.mca-filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.hut-archive {
  color: #1f2933;
}

.hut-archive .lead {
  max-width: 760px;
}

.hut-stat-panel,
.hut-doc-card,
.hut-detail-panel,
.hut-issue-header,
.hut-ai-panel,
.hut-reader-toolbar,
.hut-pdf-frame {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hut-detail-page .container-xl {
  max-width: 1320px;
}

.hut-issue-header .h2 {
  max-width: 900px;
}

.hut-detail-search {
  min-width: min(100%, 320px);
}

.hut-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.hut-stat-grid > div {
  border: 1px solid #e6e9ed;
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #f8fafc;
}

.hut-stat-value,
.hut-stat-label {
  display: block;
}

.hut-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
}

.hut-stat-label {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hut-year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

.hut-year-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 74px;
  justify-content: center;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.85rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.hut-year-link:hover,
.hut-doc-card:hover {
  border-color: #9ab7d8;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.08);
}

.hut-year-link span {
  font-size: 1.1rem;
  font-weight: 700;
}

.hut-year-link small {
  color: #6c757d;
}

.hut-doc-card {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1rem;
  background: #fff;
}

.hut-doc-card a {
  text-decoration: none;
}

.hut-doc-card a:hover {
  text-decoration: underline;
}

.hut-year-sidebar {
  position: sticky;
  top: 1rem;
}

.hut-metadata-list {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) 1.2fr;
  gap: 0.45rem 0.75rem;
  margin-bottom: 0;
}

.hut-metadata-list dt {
  color: #6c757d;
}

.hut-metadata-list dd {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.hut-metadata-list-wide {
  grid-template-columns: minmax(140px, max-content) minmax(180px, 1fr);
  max-width: 720px;
}

.hut-reader-actions {
  flex-wrap: wrap;
}

.hut-page-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-height: 8.25rem;
  overflow-y: auto;
}

.hut-ai-panel {
  background: #fffdf7 !important;
}

.hut-ai-overview {
  max-width: 880px;
}

.hut-article-item:first-child {
  border-top: 0 !important;
}

.hut-title-source {
  font-weight: 700;
}

.hut-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hut-pdf-frame iframe {
  display: block;
  width: 100%;
  height: min(82vh, 900px);
  min-height: 520px;
  border: 0;
}

.hut-pdf-frame-prominent iframe {
  height: min(88vh, 1040px);
  min-height: 720px;
}

.hut-excerpt {
  line-height: 1.55;
}

.hut-excerpt mark {
  padding: 0.05rem 0.15rem;
  border-radius: 0.2rem;
}

@media (max-width: 767.98px) {
  .hut-stat-grid {
    grid-template-columns: 1fr;
  }

  .hut-year-sidebar {
    position: static;
    max-height: 260px;
    overflow-y: auto;
  }

  .hut-metadata-list {
    grid-template-columns: 1fr;
  }

  .hut-detail-search,
  .hut-detail-search .form-control,
  .hut-detail-search .btn,
  .hut-reader-actions,
  .hut-reader-actions .btn {
    width: 100%;
  }

  .hut-reader-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hut-pdf-frame iframe {
    height: 68vh;
    min-height: 420px;
  }

  .hut-pdf-frame-prominent iframe {
    height: 72vh;
    min-height: 460px;
  }
}

.mca-sort-status {
  min-height: 1.25rem;
}

.mca-sortable {
  cursor: pointer;
  user-select: none;
}

.mca-sortable[aria-sort="ascending"],
.mca-sortable[aria-sort="descending"] {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: -4px;
}

.mca-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

.mca-status-item {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #fff;
}

.mca-status-label {
  color: #6c757d;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mca-status-value {
  font-size: 1.15rem;
  font-weight: 700;
}

.mca-step-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}

.mca-step {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
}

.mca-step.is-active {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.12);
}

@media (max-width: 767.98px) {
  .mca-responsive-actions {
    width: 100%;
  }

  .mca-responsive-actions .btn {
    width: 100%;
  }

  .mca-stacked-table {
    overflow: visible;
  }

  .mca-stacked-table table,
  .mca-stacked-table thead,
  .mca-stacked-table tbody,
  .mca-stacked-table th,
  .mca-stacked-table td,
  .mca-stacked-table tr {
    display: block;
  }

  .mca-stacked-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .mca-stacked-table tbody tr {
    margin-bottom: 0.85rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    background: #fff;
    overflow: hidden;
  }

  .mca-stacked-table tbody td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #eef0f2;
    text-align: right !important;
  }

  .mca-stacked-table tbody td:last-child {
    border-bottom: 0;
  }

  .mca-stacked-table tbody td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: #6c757d;
    font-weight: 700;
    text-align: left;
  }

  .mca-stacked-table tbody td[data-mobile-primary] {
    display: block;
    background: #f8f9fa;
    text-align: left !important;
  }

  .mca-stacked-table tbody td[data-mobile-primary]::before {
    display: none;
  }
}