.archive-page {
  min-height: 100vh;
  background:
    radial-gradient(circle, rgba(245, 211, 31, 0.075) 1px, transparent 1.5px) 0 0 / 12px 12px,
    linear-gradient(155deg, #171d28, #090b10 64%);
  color: #f4f4f7;
}

@media (min-width: 721px) {
  .archive-page {
    background:
      radial-gradient(circle, rgba(245, 211, 31, 0.075) 1px, transparent 1.5px) 0 0 / 12px 12px,
      linear-gradient(rgba(7, 10, 18, 0.66), rgba(7, 10, 18, 0.82)),
      url("../images/Desktop-Background.png") center / cover fixed no-repeat;
  }
}

.archive-wordmark,
.archive-return,
.cover-topline,
.cover-footer,
.cover-kicker,
.archive-kicker,
.file-kicker,
.dossier-number,
.dossier-glyph,
.dossier-name,
.dossier-open,
.file-header,
.profile-pager button,
.archive-footer a {
  font-family: var(--font-display);
}

.archive-return i {
  margin-right: 0.35em;
}

.dossier-open i {
  margin-left: 0.35em;
}

.archive-masthead,
.archive-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}

.archive-masthead {
  min-height: 62px;
  border-bottom: 1px solid rgba(245, 211, 31, 0.27);
}

.archive-wordmark {
  color: #f4f4f7;
  font-size: 0.84rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.archive-wordmark > span {
  color: #f5d31f;
}

.archive-wordmark small {
  margin-left: 5px;
  color: #9aa6ba;
  font-size: 0.56rem;
}

.archive-return,
.archive-footer a {
  color: #d5d9e2;
  font-size: 0.72rem;
  font-weight: 800;
}

.archive-return:hover,
.archive-return:focus-visible,
.archive-footer a:hover,
.archive-footer a:focus-visible {
  color: #f5d31f;
  outline: none;
}

.archive-main {
  width: min(1000px, calc(100% - 36px));
  margin: 28px auto 40px;
}

.archive-cover {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 4vw, 36px);
  border: 2px solid #f5d31f;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.13) 1px, transparent 1.6px) 0 0 / 8px 8px,
    linear-gradient(125deg, #1d3462, #152342 44%, #0b101a 100%);
  box-shadow: 12px 14px 0 rgba(0, 0, 0, 0.35);
}

.archive-cover::before,
.archive-cover::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.archive-cover::before {
  top: 44px;
  right: 17%;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(245, 211, 31, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(55, 117, 255, 0.07), 0 0 0 56px rgba(245, 211, 31, 0.045);
}

.archive-cover::after {
  right: -50px;
  bottom: -110px;
  width: 430px;
  height: 250px;
  transform: rotate(-22deg);
  background: linear-gradient(90deg, transparent, rgba(245, 211, 31, 0.1), transparent);
}

.cover-topline,
.cover-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #f5d31f;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cover-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.8fr);
  align-items: center;
  gap: 28px;
  min-height: 340px;
}

.cover-copy {
  position: relative;
  max-width: 520px;
  padding-block: 34px;
}

.cover-kicker,
.archive-kicker,
.file-kicker {
  margin: 0 0 8px;
  color: #86a9ff;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.cover-copy h1 {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 1000;
  letter-spacing: -0.065em;
  line-height: 0.86;
  text-transform: uppercase;
  text-shadow: 5px 5px 0 #244bc1, 8px 8px 0 rgba(0, 0, 0, 0.35);
}

.cover-copy h1 em {
  color: #f5d31f;
  font-style: normal;
}

.cover-intro {
  max-width: 420px;
  margin: 20px 0 0;
  color: #e0e5ef;
  font-size: 0.92rem;
  line-height: 1.6;
}

.cover-stamp {
  position: absolute;
  right: -52px;
  bottom: 30px;
  display: grid;
  place-content: center;
  width: 78px;
  height: 78px;
  transform: rotate(9deg);
  border: 2px solid #f5d31f;
  border-radius: 50%;
  background: #111721;
  box-shadow: 0 0 0 5px rgba(245, 211, 31, 0.12);
  color: #f5d31f;
  text-align: center;
}

.cover-stamp span {
  font-size: 0.49rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.cover-stamp strong {
  font-size: 0.8rem;
  line-height: 0.95;
}

.cover-art {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 265px;
  overflow: hidden;
  clip-path: polygon(10% 4%, 100% 0, 90% 96%, 0 100%);
  border: 2px solid rgba(245, 211, 31, 0.74);
  background:
    radial-gradient(circle, rgba(245, 211, 31, 0.3) 1px, transparent 1.8px) 0 0 / 7px 7px,
    linear-gradient(140deg, rgba(55, 117, 255, 0.3), transparent 55%),
    #0c111b;
  transform: rotate(3deg);
}

.cover-team-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 26%;
}

.cover-art-caption {
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 10px;
  color: #d5d9e2;
  font-size: 0.53rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.cover-footer {
  align-items: flex-end;
  padding-top: 16px;
  border-top: 1px solid rgba(245, 211, 31, 0.3);
}

.cover-footer p {
  max-width: 520px;
  margin: 0;
  color: #d5d9e2;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

.cover-footer > span {
  flex: 0 0 auto;
  color: #f5d31f;
  font-size: 0.54rem;
}

.archive-index {
  padding-top: 44px;
}

.archive-index[hidden] {
  display: none;
}

.index-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.archive-kicker {
  margin-bottom: 5px;
  color: #f5d31f;
}

.index-heading h2 {
  margin: 0;
  color: #f4f4f7;
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 950;
  text-transform: uppercase;
}

.archive-search-label {
  display: grid;
  gap: 5px;
  width: min(290px, 45%);
  color: #9aa6ba;
  font-size: 0.65rem;
  font-weight: 800;
}

.archive-search-label input {
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid #34415a;
  border-radius: 999px;
  background: #111721;
  color: #f4f4f7;
  font-size: 0.75rem;
}

.archive-search-label input:focus {
  border-color: #3775ff;
  outline: 2px solid rgba(55, 117, 255, 0.2);
}

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

.dossier-card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 180px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  overflow: hidden;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.16) 1px, transparent 1.5px) 0 0 / 8px 8px,
    linear-gradient(140deg, rgba(36, 75, 193, 0.72), #10151f 75%);
  color: #f4f4f7;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.dossier-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: -28px;
  right: -33px;
  width: 112px;
  height: 145px;
  transform: rotate(19deg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), transparent);
}

.dossier-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 12, 20, 0.94), rgba(8, 12, 20, 0.28) 78%);
  pointer-events: none;
}

.dossier-art {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.dossier-card:hover,
.dossier-card:focus-visible {
  z-index: 1;
  transform: translateY(-4px) rotate(-1deg);
  border-color: #f5d31f;
  box-shadow: 5px 7px 0 rgba(245, 211, 31, 0.22);
  outline: none;
}

.dossier-card[hidden] {
  display: none;
}

.dossier-card--gold { background-color: #453d1a; }
.dossier-card--blue { background-color: #182b4f; }
.dossier-card--red { background-color: #4a2029; }
.dossier-card--green { background-color: #183c37; }

.dossier-number,
.dossier-glyph,
.dossier-name,
.dossier-identity,
.dossier-open {
  position: relative;
  z-index: 2;
}

.dossier-number {
  position: absolute;
  top: 11px;
  left: 13px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.59rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.dossier-glyph {
  position: absolute;
  top: 27px;
  right: 11px;
  max-width: 70%;
  color: #f5d31f;
  font-size: clamp(1.1rem, 3vw, 1.9rem);
  font-weight: 1000;
  letter-spacing: -0.06em;
  opacity: 0.78;
  text-align: right;
  text-shadow: 3px 3px 0 #244bc1;
}

.dossier-name {
  font-size: 1.14rem;
  font-weight: 950;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.dossier-identity {
  margin-top: 3px;
  color: #d5d9e2;
  font-size: 0.62rem;
  line-height: 1.4;
}

.dossier-open {
  margin-top: 12px;
  color: #f5d31f;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.archive-empty {
  margin: 0 0 14px;
  color: #d5d9e2;
  font-size: 0.8rem;
}

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

.character-file {
  margin-top: 20px;
  border: 1px solid #33405a;
  background:
    radial-gradient(circle, rgba(55, 117, 255, 0.09) 1px, transparent 1.5px) 0 0 / 10px 10px,
    #10151f;
  animation: file-page-enter 220ms ease-out both;
}

.character-file[hidden] {
  display: none;
}

.file-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  color: #e8d36a;
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.file-header--blue { border-top: 5px solid #3775ff; }
.file-header--gold { border-top: 5px solid #f5d31f; }
.file-header--red { border-top: 5px solid #ff4058; }
.file-header--green { border-top: 5px solid #51d6ad; }

.back-to-index,
.profile-pager button {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 7px 10px;
  border: 1px solid #44516b;
  border-radius: 6px;
  background: #171e2b;
  color: #d5d9e2;
  font-size: 0.65rem;
  font-weight: 800;
  cursor: pointer;
}

.back-to-index:hover,
.back-to-index:focus-visible,
.profile-pager button:hover,
.profile-pager button:focus-visible {
  border-color: #f5d31f;
  color: #f5d31f;
  outline: none;
}

.file-hero {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  padding: clamp(24px, 5vw, 48px) clamp(170px, 30%, 300px) clamp(24px, 5vw, 48px) clamp(24px, 5vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(112deg, rgba(36, 75, 193, 0.6), transparent 78%),
    radial-gradient(circle at 84% 32%, rgba(245, 211, 31, 0.14), transparent 26%);
}

.file-hero::after {
  content: attr(data-mark);
  position: absolute;
  top: 50%;
  right: clamp(150px, 28%, 280px);
  transform: translateY(-50%) rotate(-9deg);
  color: rgba(245, 211, 31, 0.14);
  font-size: clamp(4rem, 15vw, 10rem);
  font-weight: 1000;
  letter-spacing: -0.08em;
  line-height: 1;
  pointer-events: none;
}

.file-kicker {
  position: relative;
  z-index: 1;
  color: #f5d31f;
}

.file-portrait {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(16px, 4vw, 38px);
  width: clamp(120px, 24%, 220px);
  height: clamp(160px, 22vw, 220px);
  transform: translateY(-50%);
  border: 2px solid rgba(245, 211, 31, 0.8);
  box-shadow: 8px 9px 0 rgba(0, 0, 0, 0.32);
  object-fit: cover;
}

.file-hero h2 {
  position: relative;
  z-index: 2;
  margin: 0;
  color: #fff;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  font-weight: 1000;
  letter-spacing: -0.06em;
  line-height: 0.95;
  text-transform: uppercase;
  text-shadow: 4px 4px 0 #244bc1;
}

.file-subtitle,
.file-debut {
  position: relative;
  z-index: 2;
  color: #d5d9e2;
}

.file-subtitle {
  margin: 9px 0 22px;
  font-size: 0.86rem;
}

.file-debut {
  display: inline-grid;
  gap: 3px;
  margin: 0;
  padding: 9px 12px;
  border-left: 3px solid #f5d31f;
  background: rgba(7, 11, 19, 0.66);
  font-size: 0.61rem;
  line-height: 1.4;
}

.file-debut strong {
  color: #f5d31f;
  font-size: 0.76rem;
}

.file-debut span {
  color: #9aa6ba;
}

.file-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.6fr) minmax(0, 1.7fr);
  gap: clamp(18px, 4vw, 38px);
  padding: clamp(18px, 4vw, 34px);
}

.file-quote {
  align-self: start;
  margin: 0;
  padding: 16px 14px;
  transform: rotate(-2deg);
  border: 1px solid #f5d31f;
  background: #f5d31f;
  box-shadow: 5px 6px 0 #244bc1;
  color: #10151f;
  font-size: 0.94rem;
  font-weight: 950;
  line-height: 1.25;
}

.file-quote span {
  display: block;
  margin-top: 11px;
  font-size: 0.59rem;
  font-weight: 700;
}

.file-main {
  display: grid;
  gap: 20px;
}

.file-main section h3,
.file-sources h3,
.archive-method h2 {
  margin: 0 0 7px;
  color: #f5d31f;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.file-main section p,
.file-main section li {
  color: #d5d9e2;
  font-size: 0.78rem;
  line-height: 1.65;
}

.file-main section p {
  margin: 0;
}

.file-main section ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
}

.file-fact {
  padding: 12px 14px;
  border-left: 3px solid #3775ff;
  background: rgba(36, 75, 193, 0.13);
}

.file-credit {
  padding: 12px 14px;
  border-left: 3px solid #f5d31f;
  background: rgba(245, 211, 31, 0.07);
}

.file-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 14px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.file-sources h3 {
  flex: 0 0 100%;
}

.file-sources a,
.archive-research-links a {
  color: #86a9ff;
  font-size: 0.64rem;
  font-weight: 750;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.file-sources a:hover,
.file-sources a:focus-visible,
.archive-research-links a:hover,
.archive-research-links a:focus-visible {
  color: #f5d31f;
  outline: none;
}

.profile-pager {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.archive-method {
  margin-top: 34px;
  padding: 16px 18px;
  border-left: 3px solid #3775ff;
  background: rgba(16, 21, 31, 0.9);
}

.archive-method p {
  margin: 0;
  color: #9aa6ba;
  font-size: 0.67rem;
  line-height: 1.6;
}

.archive-research-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
}

.archive-footer {
  min-height: 56px;
  border-top: 1px solid rgba(245, 211, 31, 0.22);
  color: #9aa6ba;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

@keyframes file-page-enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .archive-main,
  .archive-masthead,
  .archive-footer {
    width: min(100% - 24px, 600px);
  }

  .cover-grid {
    grid-template-columns: minmax(0, 1fr) minmax(125px, 0.55fr);
    gap: 12px;
    min-height: 280px;
  }

  .cover-art {
    min-height: 210px;
  }

  .cover-stamp {
    right: -18px;
    bottom: 4px;
    width: 62px;
    height: 62px;
  }

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

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

  .file-hero {
    min-height: 240px;
    padding-right: 155px;
  }

  .file-portrait {
    right: 14px;
    width: 122px;
    height: 168px;
  }

  .file-hero::after {
    right: 138px;
  }

  .file-quote {
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .archive-masthead {
    min-height: 56px;
  }

  .archive-wordmark {
    font-size: 0.68rem;
  }

  .archive-wordmark small {
    display: none;
  }

  .archive-return {
    max-width: 112px;
    font-size: 0.6rem;
    text-align: right;
  }

  .archive-main {
    margin-top: 14px;
  }

  .cover-topline {
    font-size: 0.48rem;
  }

  .cover-grid {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .file-hero {
    min-height: 220px;
    padding: 22px 132px 22px 18px;
  }

  .file-portrait {
    right: 10px;
    width: 104px;
    height: 142px;
  }

  .file-hero::after {
    right: 115px;
  }

  .cover-copy {
    padding-block: 30px 10px;
  }

  .cover-copy h1 {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }

  .cover-intro {
    max-width: 320px;
    font-size: 0.78rem;
  }

  .cover-art {
    min-height: 115px;
  }

  .cover-x {
    font-size: 8rem;
  }

  .cover-stamp {
    right: 0;
    bottom: -9px;
    width: 58px;
    height: 58px;
  }

  .cover-footer {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 16px;
    font-size: 0.5rem;
  }

  .cover-footer p {
    font-size: 0.65rem;
  }

  .index-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .archive-search-label {
    width: 100%;
  }

  .dossier-card {
    min-height: 156px;
    padding: 11px;
  }

  .dossier-name {
    font-size: 0.9rem;
  }

  .dossier-identity {
    font-size: 0.57rem;
  }

  .dossier-glyph {
    top: 30px;
  }

  .file-header {
    padding: 9px 10px;
    font-size: 0.48rem;
  }

  .back-to-index,
  .profile-pager button {
    padding: 7px;
    font-size: 0.58rem;
  }

  .file-main section p,
  .file-main section li {
    font-size: 0.72rem;
  }

  .file-sources {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-sources h3 {
    flex-basis: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .character-file {
    animation: none;
  }

  .dossier-card {
    transition-duration: 0.01ms;
  }
}

@media (min-width: 721px) {
  .archive-page {
    background-image:
      radial-gradient(circle, rgba(245, 211, 31, 0.075) 1px, transparent 1.5px),
      linear-gradient(155deg, rgba(23, 29, 40, 0.9), rgba(9, 11, 16, 0.86)),
      url("../images/Desktop-Background.png");
    background-position: 0 0, center, center;
    background-size: 12px 12px, cover, cover;
    background-attachment: fixed;
  }
}
