.records-page {
  min-width: 320px;
  color: var(--ink);
  background: #eef3f7;
}

.records-page .site-header {
  background: rgba(255, 255, 255, 0.97);
}

.catalog-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 84% 36%, rgba(213, 169, 77, 0.25), transparent 24%),
    linear-gradient(110deg, var(--forest-950), var(--forest-800));
}

.catalog-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(30deg, transparent 48%, rgba(255, 255, 255, 0.45) 49%, transparent 51%),
    linear-gradient(150deg, transparent 48%, rgba(255, 255, 255, 0.45) 49%, transparent 51%);
  background-size: 42px 70px;
  pointer-events: none;
}

.catalog-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 40px));
  min-height: 178px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 32px 0 48px;
}

.catalog-eyebrow {
  margin: 0 0 5px;
  color: #f2cf7f;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.catalog-hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.7rem);
  line-height: 1.05;
}

.catalog-hero h1 + p {
  max-width: 650px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
}

.catalog-summary {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(95px, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.catalog-summary span {
  min-width: 110px;
  display: grid;
  justify-items: center;
  padding: 15px 13px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
}

.catalog-summary span:last-child {
  border-right: 0;
}

.catalog-summary strong {
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 1.55rem;
  line-height: 1.1;
}

.catalog-shell {
  position: relative;
  z-index: 2;
  width: min(1320px, calc(100% - 40px));
  min-height: 620px;
  margin: -28px auto 70px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px 180px auto;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border: 1px solid rgba(0, 88, 63, 0.08);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(6, 60, 47, 0.12);
}

.catalog-search {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #cbd9e2;
  border-radius: 10px;
  background: #f3f7fa;
}

.catalog-search:focus-within,
.select-control:focus-within {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 4px rgba(10, 130, 93, 0.1);
}

.catalog-search svg {
  width: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: #527082;
  stroke-width: 2;
  stroke-linecap: round;
}

.catalog-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 0.9rem;
}

.select-control {
  min-height: 48px;
  display: flex;
  align-items: center;
  border: 1px solid #d6e0e7;
  border-radius: 10px;
  background: var(--white);
}

.select-control select {
  width: 100%;
  min-height: 46px;
  border: 0;
  outline: 0;
  padding: 0 34px 0 12px;
  color: #294a40;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.view-switch {
  display: flex;
  gap: 3px;
  padding: 4px;
  border-radius: 10px;
  background: #eef3f6;
}

.view-switch button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #6c8290;
  background: transparent;
  cursor: pointer;
}

.view-switch button.active {
  color: var(--forest-800);
  background: var(--white);
  box-shadow: 0 2px 8px rgba(20, 60, 46, 0.11);
}

.view-switch svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.catalog-result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 20px 2px 14px;
}

.catalog-result-line p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.catalog-result-line p strong {
  color: var(--forest-950);
}

.catalog-result-line a {
  color: var(--forest-800);
  font-size: 0.88rem;
  font-weight: 800;
}

.catalog-result-line a:hover {
  color: var(--gold-dark);
}

.relic-catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 19px;
}

.relic-catalog.list-view {
  grid-template-columns: 1fr;
}

.relic-card {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #dce5ea;
  border-radius: 15px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(20, 57, 77, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.relic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 35px rgba(20, 57, 77, 0.14);
}

.relic-cover {
  position: relative;
  min-height: 188px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  overflow: hidden;
  color: var(--forest-800);
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.75), transparent 21%),
    linear-gradient(135deg, #d8e8df, #edf3ef);
}

.relic-cover::after {
  content: attr(data-symbol);
  position: absolute;
  right: -7px;
  bottom: -56px;
  color: rgba(0, 88, 63, 0.07);
  font-family: var(--font-serif);
  font-size: 10rem;
  font-weight: 900;
  line-height: 1;
}

.relic-cover.chua {
  color: #8f671b;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.72), transparent 21%),
    linear-gradient(135deg, #f2e4bc, #faf5e8);
}

.relic-cover.den {
  color: #b6383c;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.74), transparent 21%),
    linear-gradient(135deg, #f2d7d8, #fbefef);
}

.relic-cover.mieu {
  color: #0d7196;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.74), transparent 21%),
    linear-gradient(135deg, #d5ebf3, #edf7fa);
}

.relic-cover.complex {
  color: #715098;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.74), transparent 21%),
    linear-gradient(135deg, #e5dcef, #f5f0fa);
}

.relic-cover.van_chi {
  color: #8b5f2b;
  background:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.74), transparent 21%),
    linear-gradient(135deg, #eadcc8, #faf4eb);
}

.relic-cover > img {
  position: relative;
  z-index: 1;
  width: 82px;
  height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(0, 48, 35, 0.16));
}

.relic-cover > img.relic-real-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.relic-cover > span:not(.rank-badge):not(.cover-status) {
  position: relative;
  z-index: 1;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 0.75rem;
  font-weight: 800;
}

.rank-badge,
.cover-status {
  position: absolute;
  z-index: 2;
  top: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 3px 11px rgba(20, 57, 77, 0.1);
  font-size: 0.72rem;
  font-weight: 850;
}

.rank-badge {
  left: 11px;
  color: var(--water);
}

.rank-badge.national {
  color: var(--red);
}

.rank-badge.unranked {
  color: #687d76;
}

.cover-status {
  right: 11px;
  color: #087043;
}

.cover-status.missing {
  color: #a52f34;
}

.relic-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.relic-card-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.relic-type {
  padding: 3px 7px;
  border-radius: 6px;
  color: var(--forest-900);
  background: var(--forest-100);
  font-size: 0.75rem;
  font-weight: 850;
}

.relic-code {
  color: #6e8490;
  font-size: 0.75rem;
}

.relic-card h2 {
  min-height: 2.7em;
  margin: 0 0 7px;
  color: #0b3e5a;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.25;
  text-transform: uppercase;
}

.relic-card-info {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  color: #637983;
  font-size: 0.78rem;
}

.relic-card-info span {
  display: flex;
  gap: 6px;
}

.relic-card-info i {
  color: var(--gold-dark);
  font-style: normal;
}

.relic-profile-link {
  width: 100%;
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: auto;
  border-radius: 9px;
  color: var(--white);
  background: #0b4566;
  font-size: 0.86rem;
  font-weight: 850;
}

.relic-profile-link:hover {
  background: var(--forest-800);
}

.relic-catalog.list-view .relic-card {
  min-height: 170px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.relic-catalog.list-view .relic-cover {
  min-height: 170px;
}

.relic-catalog.list-view .relic-card h2 {
  min-height: 0;
}

.relic-catalog.list-view .relic-profile-link {
  width: max-content;
  min-width: 180px;
}

.catalog-empty {
  min-height: 340px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}

.catalog-empty[hidden] {
  display: none;
}

.catalog-empty strong {
  color: var(--forest-950);
  font-family: var(--font-serif);
  font-size: 1.45rem;
}

.catalog-empty button {
  margin-top: 12px;
  border: 0;
  border-radius: 9px;
  padding: 9px 15px;
  color: var(--white);
  background: var(--forest-800);
  font-weight: 800;
  cursor: pointer;
}

.profile-titlebar {
  min-height: 50px;
  display: flex;
  align-items: center;
  color: var(--white);
  background: #0b4566;
}

.profile-titlebar > div {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cce8f4;
  font-weight: 750;
}

.back-link:hover {
  color: var(--white);
}

.titlebar-divider {
  color: rgba(255, 255, 255, 0.35);
}

.profile-titlebar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-shell {
  width: min(1220px, calc(100% - 40px));
  margin: 24px auto 65px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: start;
  gap: 20px;
}

.profile-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.profile-media-card,
.profile-tabs-card,
.profile-summary-card,
.profile-action-card,
.related-card {
  overflow: hidden;
  border: 1px solid #dce5ea;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 7px 22px rgba(20, 57, 77, 0.07);
}

.profile-cover {
  position: relative;
  min-height: 430px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 11px;
  overflow: hidden;
  color: var(--forest-800);
  background:
    radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 0.88), transparent 24%),
    linear-gradient(140deg, #d5e6dc, #edf3ef);
}

.profile-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(30deg, transparent 48%, currentColor 49%, transparent 51%),
    linear-gradient(150deg, transparent 48%, currentColor 49%, transparent 51%);
  background-size: 60px 100px;
}

.profile-cover.chua {
  color: #8f671b;
  background: linear-gradient(140deg, #f0e2b9, #faf5e7);
}

.profile-cover.den {
  color: #b6383c;
  background: linear-gradient(140deg, #f0d5d6, #fbeeee);
}

.profile-cover.mieu {
  color: #0d7196;
  background: linear-gradient(140deg, #d4e9f2, #edf7fa);
}

.profile-cover.complex {
  color: #715098;
  background: linear-gradient(140deg, #e4dbed, #f4eff9);
}

.profile-cover.van_chi {
  color: #8b5f2b;
  background: linear-gradient(140deg, #eadbc5, #faf4ea);
}

.profile-cover > img {
  position: relative;
  z-index: 1;
  width: 145px;
  height: 145px;
  object-fit: contain;
  filter: drop-shadow(0 13px 22px rgba(0, 48, 35, 0.18));
}

.profile-cover.has-photo {
  display: block;
  background: #dce8e3;
}

.profile-cover.has-photo::before {
  display: none;
}

.profile-cover.has-photo > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
}

.profile-cover > div {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  padding: 7px 13px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.88);
}

.profile-cover > #profile-media-copy[hidden],
.profile-cover.has-photo > #profile-media-copy {
  display: none !important;
}

.profile-cover > div span {
  font-size: 0.75rem;
}

.profile-cover > div strong {
  font-size: 0.92rem;
}

.gallery-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: rgba(6, 60, 47, 0.62);
  font-size: 1.65rem;
  line-height: 1;
  transform: translateY(-50%);
}

.gallery-nav:hover {
  background: var(--forest-800);
}

.gallery-nav.previous {
  left: 13px;
}

.gallery-nav.next {
  right: 13px;
}

.profile-counter {
  position: absolute;
  z-index: 2;
  right: 13px;
  bottom: 13px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(6, 60, 47, 0.72);
  font-size: 0.75rem;
  font-weight: 800;
}

.profile-thumbnail-row {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
}

.profile-thumb {
  width: 62px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 7px;
  background: var(--mist);
  cursor: pointer;
}

.profile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.profile-thumb:not(.active) {
  border-color: transparent;
}

.profile-thumbnail-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.profile-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #dde6eb;
}

.profile-tabs button {
  min-height: 52px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #647b87;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 750;
  cursor: pointer;
}

.profile-tabs button:hover,
.profile-tabs button.active {
  color: #0b4566;
  border-bottom-color: var(--gold);
  background: #f5f9fb;
}

.profile-tabs button:focus-visible {
  outline: 3px solid rgba(14, 127, 169, 0.2);
  outline-offset: -3px;
}

.profile-tab-panel {
  padding: 18px;
}

.profile-tab-panel[hidden] {
  display: none;
}

.information-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin: 0;
}

.information-grid > div {
  min-height: 78px;
  padding: 13px;
  border-radius: 10px;
  background: #f5f8fa;
}

.information-grid > .wide {
  grid-column: 1 / -1;
}

.information-grid dt {
  margin-bottom: 4px;
  color: #557183;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.information-grid dd {
  margin: 0;
  color: #102f3d;
  font-size: 0.9rem;
  font-weight: 750;
}

.information-grid .profile-long-copy,
.profile-rich-text {
  white-space: pre-line;
  line-height: 1.75;
  font-weight: 500;
}

.profile-rich-text {
  min-height: 230px;
  padding: 10px 8px;
  color: #294957;
}

.profile-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.profile-gallery-grid[hidden] {
  display: none;
}

.profile-gallery-grid a {
  overflow: hidden;
  border: 1px solid #dce5ea;
  border-radius: 11px;
  color: #183e4d;
  background: #f6f9fa;
}

.profile-gallery-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
}

.profile-gallery-grid span {
  display: block;
  padding: 9px 11px;
  font-size: 0.78rem;
  font-weight: 700;
}

.tab-empty-state {
  min-height: 260px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.tab-empty-state[hidden],
.profile-rich-text[hidden] {
  display: none;
}

.tab-empty-state > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 5px;
  border-radius: 50%;
  color: var(--forest-800);
  background: var(--forest-100);
  font-size: 1.5rem;
}

.tab-empty-state strong {
  color: var(--forest-950);
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.tab-empty-state p {
  max-width: 480px;
  margin: 0;
  font-size: 0.9rem;
}

.document-summary {
  min-height: 190px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 11px;
  background: #f5f8fa;
}

.document-icon {
  width: 58px;
  height: 68px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--white);
  background: #0b4566;
  font-size: 0.9rem;
  font-weight: 900;
}

.document-summary div {
  display: grid;
  gap: 4px;
}

.document-summary small {
  color: var(--muted);
}

.document-summary strong {
  color: var(--forest-950);
}

.document-summary p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.document-browser {
  display: grid;
  grid-template-columns: minmax(230px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
}

.document-browser[hidden] {
  display: none;
}

.document-list-panel,
.document-preview-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce5ea;
  border-radius: 12px;
  background: #f7fafb;
}

.document-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #dce5ea;
  background: var(--white);
}

.document-list-heading div {
  display: grid;
  gap: 3px;
}

.document-list-heading small {
  color: var(--forest-700);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.document-list-heading strong {
  color: var(--forest-950);
  font-family: var(--font-serif);
}

.document-list-heading > span {
  padding: 4px 7px;
  border-radius: 999px;
  color: #42606f;
  background: #edf3f6;
  font-size: 0.75rem;
  font-weight: 850;
}

.document-list {
  max-height: 680px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 9px;
}

.document-list-item {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #244653;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.document-list-item:hover,
.document-list-item.active {
  border-color: #a8cbbd;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(20, 57, 77, 0.07);
}

.document-list-item:focus-visible {
  outline: 3px solid rgba(0, 120, 79, 0.18);
  outline-offset: 1px;
}

.document-file-badge {
  width: 43px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--white);
  background: #b43e43;
  font-size: 0.75rem;
  font-weight: 900;
}

.document-file-badge.docx {
  background: #1769a4;
}

.document-list-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.document-list-copy small {
  color: var(--forest-700);
  font-size: 0.75rem;
  font-weight: 800;
}

.document-list-copy strong {
  overflow: hidden;
  color: #153947;
  font-size: 0.84rem;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.document-list-copy span {
  overflow: hidden;
  color: #6b7f89;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-preview-panel {
  background: var(--white);
}

.document-preview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  border-bottom: 1px solid #dce5ea;
}

.document-preview-heading > div:first-child {
  min-width: 0;
}

.document-preview-heading span {
  color: var(--forest-700);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.document-preview-heading h2 {
  margin: 4px 0 3px;
  color: var(--forest-950);
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.28;
}

.document-preview-heading p {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.document-preview-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.document-preview-actions a {
  padding: 8px 10px;
  border: 1px solid #bfd0d9;
  border-radius: 8px;
  color: #0b4566;
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 850;
}

.document-preview-actions a:first-child {
  border-color: #0b4566;
  color: var(--white);
  background: #0b4566;
}

.document-preview-actions a:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 13px rgba(11, 69, 102, 0.13);
}

.document-description {
  margin: 0;
  padding: 12px 15px;
  border-bottom: 1px solid #e4eaee;
  color: #4f6874;
  background: #f8fafb;
  font-size: 0.84rem;
  line-height: 1.55;
}

.document-viewer {
  min-height: 610px;
  background: #e8eef1;
}

.document-viewer iframe {
  width: 100%;
  height: 610px;
  display: block;
  border: 0;
  background: var(--white);
}

.document-viewer-note {
  margin: 0;
  padding: 9px 12px;
  color: #667d87;
  background: #f5f8fa;
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: center;
}

.profile-sidebar {
  display: grid;
  gap: 13px;
}

.profile-summary-card {
  padding: 20px;
  border-top: 4px solid var(--gold);
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.profile-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--forest-900);
  background: var(--forest-100);
  font-size: 0.72rem;
  font-weight: 850;
}

.profile-tags span:first-child {
  color: #7a5817;
  background: #fff1c9;
}

.profile-tags span:first-child.national {
  color: var(--red);
  background: #fde5e6;
}

.profile-tags span:last-child {
  color: #087043;
  background: #ddf5e8;
}

.profile-tags span:last-child.missing {
  color: #a52f34;
  background: #fde5e6;
}

.profile-summary-card h1 {
  margin: 11px 0 2px;
  color: #0b3e5a;
  font-family: var(--font-serif);
  font-size: 1.42rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.profile-code {
  margin: 0 0 20px;
  color: #6e8490;
  font-size: 0.76rem;
}

.quick-detail {
  margin-top: 15px;
}

.quick-detail small {
  color: #557183;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.quick-detail p {
  margin: 3px 0 0;
  color: #244655;
  font-size: 0.88rem;
}

.profile-action-card {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.profile-primary-action,
.profile-secondary-action {
  width: 100%;
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  font-size: 0.87rem;
  font-weight: 850;
  text-align: center;
  cursor: pointer;
}

.profile-primary-action {
  color: var(--white);
  background: #0b4566;
}

.profile-primary-action:hover {
  background: var(--forest-800);
}

.profile-primary-action[aria-disabled="true"] {
  color: #87979f;
  background: #e8edef;
  pointer-events: none;
}

.profile-secondary-action {
  border: 1px solid #cfdbe2;
  color: #0b4566;
  background: var(--white);
}

button.profile-secondary-action {
  font: inherit;
}

.profile-secondary-action:hover {
  border-color: var(--gold);
  background: #fffaf0;
}

.related-card h2 {
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #dde6eb;
  color: #0b3e5a;
  font-family: var(--font-serif);
  font-size: 1rem;
}

.related-list {
  display: grid;
  gap: 3px;
  padding: 8px;
}

.related-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 7px;
  border-radius: 9px;
}

.related-item:hover {
  background: #f2f7f9;
}

.related-cover {
  width: 52px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--mist);
}

.related-cover img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.related-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.related-copy strong {
  overflow: hidden;
  color: #0b4566;
  font-size: 0.78rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-copy span {
  color: var(--muted);
  font-size: 0.72rem;
}

.profile-invalid {
  width: min(650px, calc(100% - 40px));
  min-height: 520px;
  margin: 55px auto;
  display: grid;
  place-content: center;
  justify-items: center;
  color: var(--muted);
  text-align: center;
}

.profile-invalid[hidden] {
  display: none;
}

.profile-invalid img {
  width: 120px;
}

.profile-invalid h1 {
  margin: 17px 0 4px;
  color: var(--forest-950);
  font-family: var(--font-serif);
}

.profile-invalid p {
  margin: 0 0 17px;
}

.profile-invalid a {
  padding: 9px 15px;
  border-radius: 9px;
  color: var(--white);
  background: var(--forest-800);
  font-weight: 800;
}

@media (max-width: 1120px) {
  .catalog-toolbar {
    grid-template-columns: minmax(260px, 1fr) 170px 170px auto;
  }

  .relic-catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-shell {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 900px) {
  .catalog-hero-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .catalog-summary {
    align-self: stretch;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr 1fr auto;
  }

  .catalog-search {
    grid-column: 1 / -1;
  }

  .relic-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-shell {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    grid-template-columns: 1fr 1fr;
  }

  .profile-summary-card,
  .related-card {
    grid-row: span 2;
  }
}

@media (max-width: 680px) {
  .catalog-hero-inner,
  .catalog-shell,
  .profile-titlebar > div,
  .profile-shell {
    width: min(100% - 28px, 1320px);
  }

  .catalog-summary span {
    min-width: 0;
    padding-inline: 8px;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .select-control {
    min-width: 0;
  }

  .view-switch {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .relic-catalog {
    grid-template-columns: 1fr;
  }

  .relic-catalog.list-view .relic-card {
    min-height: 0;
    display: flex;
  }

  .relic-catalog.list-view .relic-cover {
    min-height: 180px;
  }

  .relic-catalog.list-view .relic-profile-link {
    width: 100%;
  }

  .profile-cover {
    min-height: 330px;
  }

  .profile-cover > img {
    width: 115px;
    height: 115px;
  }

  .profile-sidebar {
    grid-template-columns: 1fr;
  }

  .profile-summary-card,
  .related-card {
    grid-row: auto;
  }

  .profile-tabs {
    overflow-x: auto;
    grid-template-columns: repeat(4, minmax(105px, 1fr));
  }

  .information-grid {
    grid-template-columns: 1fr;
  }

  .information-grid > .wide {
    grid-column: auto;
  }

  .document-browser {
    grid-template-columns: 1fr;
  }

  .document-list {
    max-height: 285px;
  }

  .document-viewer,
  .document-viewer iframe {
    height: 500px;
    min-height: 500px;
  }
}

@media (max-width: 480px) {
  .catalog-hero-inner {
    padding-bottom: 43px;
  }

  .catalog-summary strong {
    font-size: 1.25rem;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .catalog-search,
  .view-switch {
    grid-column: auto;
  }

  .view-switch {
    justify-self: stretch;
  }

  .view-switch button {
    flex: 1;
  }

  .catalog-result-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .profile-titlebar .titlebar-divider,
  .profile-titlebar strong {
    display: none;
  }

  .profile-cover {
    min-height: 285px;
  }

  .profile-tabs-card {
    margin-inline: -1px;
  }

  .profile-tab-panel {
    padding: 13px;
  }

  .document-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-preview-heading {
    flex-direction: column;
  }

  .document-preview-actions {
    width: 100%;
    justify-content: stretch;
  }

  .document-preview-actions a {
    flex: 1;
    text-align: center;
  }

  .document-viewer,
  .document-viewer iframe {
    height: 430px;
    min-height: 430px;
  }
}
