.roster-hero {
  isolation: isolate;
  position: relative;
  padding: 8.25rem 1.4rem 2.6rem;
  text-align: center;
  background: #121510;
  overflow: hidden;
}
.roster-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #08090980, #080909 100%), url("gallery.webp") center 44% / cover;
}
.roster-hero .eyebrow { color: var(--gold); }
.roster-hero h1 { margin: .5rem 0 .8rem; font-size: clamp(4rem, 9vw, 7.5rem); }
.roster-hero-inner > p:not(.eyebrow) { color: #cfcec7; }
.catalog-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-top: .9rem; }
.catalog-link {
  display: inline-flex;
  padding: .4rem .8rem;
  background: #13130eda;
  border: 1px solid #74633c;
  border-radius: 999px;
  color: #f2dba6;
  font: 700 1.05rem/1.2 var(--head);
  letter-spacing: .045em;
  text-transform: uppercase;
}
.catalog-link:hover { border-color: var(--gold); }
.roster { width: min(100% - 2.4rem, 70rem); margin: 0 auto; padding-bottom: 4.5rem; }
.roster-note { color: #e0c683; text-align: center; font-size: .87rem; margin: 0 0 2rem; }
.roster-sources { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.25rem; padding-top: 1rem; color: #d0c9b8; font-size: .83rem; }
.roster-sources a, .record-source a { text-decoration: underline; text-underline-offset: .2em; }
.rank-group {
  margin: 0 auto;
  padding: 0 0 clamp(1.6rem, 4vw, 3rem);
}
.rank-group h2 {
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 2vw, 1.5rem);
  text-align: center;
  margin-bottom: 1.25rem;
  color: #f0e4c3;
  font-size: clamp(1.55rem, 2.5vw, 2.05rem);
  letter-spacing: .045em;
}
.rank-group h2::before, .rank-group h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #6e583000, #ac8b4a85);
}
.rank-group h2::after { transform: scaleX(-1); }
.person-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(.7rem, 2vw, 1.35rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.person-grid > li { flex: 0 1 12.3rem; min-width: 0; }
.person-card {
  display: flex;
  position: relative;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(145deg, #222218, #151610);
  border: 1px solid #51462d;
  border-radius: var(--radius-card);
  box-shadow: var(--surface-shadow);
  transition: transform .2s, border-color .2s, background-color .2s;
}
.person-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 10px 28px #0007; }
.portrait-frame { position: relative; display: block; border-bottom: 1px solid #51462d; overflow: hidden; background: #22231b; }
.card-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 50% 38%; filter: saturate(.8); transition: filter .25s, scale .3s; }
.person-card:hover .card-photo, .person-card:focus-visible .card-photo { filter: saturate(1); scale: 1.04; }
.portrait-initials { display: grid; place-items: center; font: 700 2.6rem/1 var(--head); color: #d8c797; background: #292b20; }
.card-grade {
  display: inline-flex;
  align-items: center;
  gap: .34rem;
  padding: .23rem .48rem;
  background: #141310f0;
  color: #f2dea5;
  border: 1px solid #927947a8;
  border-radius: .45rem;
  font: 700 .85rem/1.05 var(--head);
  letter-spacing: .07em;
  white-space: nowrap;
}
.portrait-frame .card-grade { position: absolute; top: .55rem; right: .55rem; box-shadow: 0 2px 10px #0007; }
.rank-marks { min-width: .72rem; display: grid; justify-items: center; gap: 1px; }
.rank-marks i { display: block; background: currentColor; }
.rank-mark-crown { width: .74rem; height: .49rem; clip-path: polygon(0 27%, 15% 12%, 41% 25%, 50% 0, 59% 25%, 85% 12%, 100% 27%, 79% 88%, 21% 88%); }
.rank-mark-pip { width: .35rem; height: .35rem; clip-path: polygon(50% 0, 65% 25%, 100% 50%, 65% 75%, 50% 100%, 35% 75%, 0 50%, 35% 25%); }
.rank-mark-chevron { width: .68rem; height: .27rem; clip-path: polygon(0 0, 50% 50%, 100% 0, 100% 50%, 50% 100%, 0 50%); }
.card-caption { display: grid; align-content: start; gap: .25rem; padding: .78rem .72rem .88rem; }
.person-card strong { font: 800 clamp(1.2rem, 2.2vw, 1.65rem)/1.05 var(--head); text-transform: uppercase; overflow-wrap: anywhere; }
.card-role { font-size: .85rem; color: #ddd4bb; line-height: 1.3; overflow-wrap: anywhere; }

.record-index { width: min(100% - 2.4rem, 64rem); margin: 0 auto 3rem; }
.record-index .record-sheet + .record-sheet { margin-top: 1rem; }
.record-sheet { scroll-margin-top: 5.5rem; }
.record-dialog {
  width: min(100% - 2rem, 58rem);
  max-width: none;
  max-height: min(92dvh, 60rem);
  overflow: hidden;
  padding: 0;
  border: 1px solid #59758f;
  border-radius: var(--radius-dialog);
  background: #101b2a;
  color: #edf2fb;
  box-shadow: 0 1rem 4rem #000a;
}
.record-dialog[open] { display: flex; flex-direction: column; }
.record-dialog [data-record-body] { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-color: #66573b #111c2a; }
.record-dialog::backdrop { background: #000d; }
.record-toolbar {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  min-height: 3rem; padding: .35rem clamp(.75rem, 3vw, 1.35rem);
  background: #0c1520; border-bottom: 1px solid #4d6278;
}
.record-toolbar p { color: #e4cc93; font: 700 .9rem/1.15 var(--head); letter-spacing: .105em; text-transform: uppercase; }
.record-toolbar button {
  border: 1px solid #526982; padding: .25rem .55rem; min-height: 2.1rem;
  border-radius: var(--radius-control);
  background: #142235; font-size: .85rem; line-height: 1.15;
}
.record-toolbar button:hover { background: #243850; }
.record-toolbar button span { font-size: 1.15rem; margin-left: .25rem; }
.record-sheet {
  --record-line: #516c8659;
  color: #edf2fb;
  border: 1px solid var(--record-line);
  border-radius: var(--radius-card);
  background: #101b29;
  font: 400 .92rem/1.48 var(--body);
}
.record-dialog .record-sheet { border: 0; }
.record-sheet p, .record-sheet h3, .record-sheet dl, .record-sheet dd { margin: 0; }
.record-profile { background: linear-gradient(135deg, #263449, #172436 68%); border-bottom: 1px solid #52687d; }
.record-dialog .record-profile { position: sticky; top: 0; z-index: 1; box-shadow: 0 .5rem 1rem #0004; }
.record-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(.65rem, 2vw, 1rem);
  align-items: center;
  padding: clamp(.75rem, 3vw, 1.25rem);
}
.record-header h2 { font-size: clamp(1.65rem, 4vw, 2.85rem); overflow-wrap: anywhere; }
.record-header .record-role { margin-top: .32rem; color: #f2d89b; font-weight: 700; overflow-wrap: anywhere; }
.record-header .record-rank { display: flex; align-items: center; flex-wrap: wrap; gap: .33rem .55rem; margin-top: .45rem; color: #c8d8e9; font-size: .82rem; }
.record-stamp { display: flex; flex-direction: column; gap: .12rem; text-align: right; color: #c3d4e7; font-size: .75rem; overflow-wrap: anywhere; }
.record-stamp span:first-child { color: #eed59b; }
.record-tablist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .32rem; padding: 0 clamp(.6rem, 3vw, 1.25rem) .55rem; }
.record-tablist button {
  min-width: 0; min-height: 2.55rem; padding: .34rem .25rem;
  border: 1px solid transparent; border-radius: .55rem; background: #0b152036;
  color: #d3dfec; font-weight: 650; font-size: .85rem; overflow-wrap: anywhere;
}
.record-tablist button:hover { background: #ffffff0d; }
.record-tablist [aria-selected="true"] { color: #f8e2ab; border-color: #b19a5b91; background: #a5894823; }
.record-tablist button:focus-visible, .record-pane:focus-visible { outline-offset: -2px; }
.record-pane { min-height: 7rem; padding: clamp(.7rem, 2.6vw, 1.2rem); }
.record-pane .record-section + .record-section { margin-top: .85rem; }
.record-section h3 {
  margin-bottom: .58rem;
  color: #f0e5ca;
  font: 700 1.3rem/1.2 var(--head);
}
.record-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.record-field {
  padding: .6rem .7rem;
  min-width: 0;
  min-height: 3.75rem;
  background: #162438;
  border: 1px solid var(--record-line);
  border-radius: .58rem;
  overflow-wrap: anywhere;
}
.record-field dt { color: #b9cbe0; font-size: .75rem; text-transform: uppercase; }
.record-field dd { margin-top: .27rem; font-weight: 700; }
.record-name { grid-column: span 2; }
.record-photo-frame { width: clamp(4rem, 11vw, 6.25rem); aspect-ratio: 1; overflow: hidden; border-radius: .75rem; border: 1px solid #9b845750; background: #182333; }
.record-photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }
.awards-list, .badges-list, .training-list { list-style: none; margin: 0; padding: .8rem; }
.awards-list, .badges-list { display: flex; flex-wrap: wrap; gap: .65rem; }
.awards-list li, .badges-list li {
  display: grid; justify-items: center; align-content: center; text-align: center; gap: .45rem;
  min-height: 5.6rem; min-width: 6.5rem; padding: .55rem .6rem;
  border: 1px solid var(--record-line); border-radius: var(--radius-control); background: #132236; font-size: .82rem;
}
.awards-list .award-tile { flex: 0 1 9.6rem; align-content: start; }
.award-tile img { width: auto; height: 8.75rem; object-fit: contain; }
.award-tile .award-short { font-weight: 700; color: #f1d593; letter-spacing: .08em; }
.record-source { padding: 0 .85rem .85rem; color: #c3d4e7; font-size: .75rem; }
.ribbon-panel { padding: .8rem; }
.ribbon-rack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 23rem);
  gap: .32rem;
}
.ribbon-rack img {
  width: 100%;
  height: auto;
  aspect-ratio: 240 / 68;
  border: 1px solid #607892;
  box-shadow: 0 2px 4px #0006;
}
.ribbon-panel h4 { margin: 1rem 0 .4rem; color: #c3d4e7; font-size: .8rem; text-transform: uppercase; }
.ribbon-order { padding-left: 1.55rem; margin: 0; }
.ribbon-order li { padding: .2rem 0 .2rem .15rem; }
.ribbon-order span, .ribbon-order li::marker { color: #c3d4e7; }
.badges-list .record-badge { flex: 1 1 8rem; max-width: 11rem; align-content: start; }
.record-badge-image { display: flex; align-items: center; justify-content: center; width: 100%; height: 3.45rem; overflow: hidden; }
.record-badge-image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.training-list { display: grid; gap: .38rem; }
.training-list li { display: flex; justify-content: space-between; gap: .75rem; padding: .55rem .65rem; border: 1px solid var(--record-line); border-radius: .58rem; background: #162438; overflow-wrap: anywhere; }
.training-list .training-date { color: #c2d7ec; white-space: nowrap; }
.training-record { display: grid; min-width: 0; gap: .18rem; }
.training-translation { color: #c2d7ec; font-size: .79rem; }
.training-certificate { width: fit-content; padding: .1rem .35rem; border: 1px solid #755f36; color: #f0d28e; }
.record-sheet .record-empty { color: #c3d4e7; padding: .85rem; }

.medal-catalog {
  width: min(100% - 2.4rem, 70rem);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 0;
  border-top: 1px solid #4b422b;
  scroll-margin-top: 4.45rem;
}
.catalog-header { max-width: 48rem; }
.catalog-header .eyebrow { color: var(--gold); }
.catalog-header h2 { margin: .55rem 0 1rem; font-size: clamp(2.85rem, 5.75vw, 5rem); }
.catalog-header > p:last-child { color: var(--muted); }
.specialty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
  margin-top: 1.55rem;
}
.specialty-group { min-width: 0; overflow: clip; border: 1px solid #354659; border-radius: var(--radius-card); background: #101b2a; }
.specialty-group h3 {
  margin: 0;
  padding: .75rem 1rem;
  background: #172940;
  color: #ead49a;
  border-bottom: 1px solid #39516c;
  font: 700 clamp(1.32rem, 2.15vw, 1.6rem)/1.12 var(--head);
  text-transform: uppercase;
}
.specialty-group ul { list-style: none; margin: 0; padding: 0 1rem; }
.specialty-group li { padding: .78rem 0; scroll-margin-top: 5.5rem; }
.specialty-group li + li { border-top: 1px solid #314257; }
.specialty-group li:target { background: #203248; }
.specialty-group h4 { margin: 0; font: 700 1.3rem/1.2 var(--head); }
.specialty-group li p { margin-top: .25rem; color: #d0d7e1; font-size: .9rem; line-height: 1.45; }
.specialty-group li .specialty-title { color: #e5c780; }
.training-categories { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.25rem; }
.training-categories a {
  padding: .36rem .66rem;
  border: 1px solid #526982;
  background: #101b2a;
  color: #efe6d0;
  font-size: .86rem;
}
.training-categories a:hover { border-color: var(--gold); }
.training-catalog .specialty-group { scroll-margin-top: 5.5rem; }
.catalog-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: .85rem;
  margin: 1.5rem 0 1.75rem;
}
.catalog-filters label { display: grid; gap: .3rem; font-size: .88rem; font-weight: 600; }
.catalog-filters :is(input, select) {
  min-width: 0;
  width: 100%;
  min-height: 2.75rem;
  padding: .5rem .65rem;
  color: var(--white);
  background: #141918;
  border: 1px solid #5c6254;
  border-radius: var(--radius-control);
  font: inherit;
}
.catalog-filters [data-medal-count] { align-self: end; padding-bottom: .55rem; color: #dfc98f; font-size: .88rem; }
.catalog-group { margin: 2rem 0; }
.catalog-group h3 { padding-bottom: .5rem; border-bottom: 1px solid #4b422b; color: #f0e4c3; font: 700 1.55rem/1.25 var(--head); text-transform: uppercase; }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
  gap: .85rem;
  list-style: none;
  padding: 0;
}
.catalog-card { display: flex; flex-direction: column; align-items: start; padding: .7rem; gap: .44rem; border: 1px solid #354659; border-radius: var(--radius-card); background: #101b2a; }
.catalog-photo { display: flex; align-items: center; justify-content: center; flex: none; width: 100%; height: 9rem; overflow: hidden; border-radius: var(--radius-control); background: #0a1018; }
.catalog-photo img { width: 100%; height: 100%; object-fit: contain; }
.catalog-card h4 { margin: 0; color: #f1f3f6; font: 700 1.25rem/1.12 var(--head); }
.badge-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); margin-top: 1.35rem; }
.badge-photo img { padding: .65rem; }
.badge-card h3 { margin: 0; color: #f1f3f6; font: 700 1.42rem/1.12 var(--head); }
.badge-card > p:not([class]) { color: #d4dae3; font-size: .88rem; }
.badge-card .catalog-credit { margin-top: auto; }
.catalog-short { color: #eed392; font: 700 .82rem/1.3 Consolas, monospace; }
.catalog-ribbon { margin-top: auto; width: 100%; max-width: 7.2rem; height: auto; aspect-ratio: 240 / 68; border: 1px solid #75869a; }
.catalog-emblem { margin-top: auto; font-size: .76rem; color: #c1c9d4; }
.catalog-credit, .catalog-sources { color: #c4cfdf; font-size: .78rem; }
.catalog-sources { margin-top: 2rem; }
.catalog-credit a, .catalog-sources a { text-decoration: underline; text-underline-offset: .2em; }

@media (max-width: 640px) {
  .specialty-grid { grid-template-columns: 1fr; gap: .75rem; }
  .catalog-filters { grid-template-columns: 1fr; gap: .6rem; }
  .catalog-filters [data-medal-count] { padding-bottom: 0; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .badge-grid { grid-template-columns: 1fr; }
  .catalog-photo { height: 7.4rem; }
  .roster-hero { padding-top: 7rem; }
  .person-grid > li { flex-basis: min(46%, 10.8rem); }
  .record-dialog { width: calc(100% - .85rem); max-height: 96dvh; }
  .record-header { grid-template-columns: auto minmax(0, 1fr); }
  .record-stamp { grid-column: 2; text-align: left; flex-flow: row wrap; gap: .1rem .45rem; }
  .record-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-field { padding: .45rem; min-height: 3rem; }
  .awards-list, .badges-list, .training-list { padding: .25rem 0; }
  .awards-list .award-tile { flex: 1 1 7rem; min-width: 0; overflow-wrap: anywhere; }
}
@media (max-width: 365px) {
  .record-tablist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 460px) and (orientation: landscape) {
  .record-header { padding-block: .45rem; }
  .record-photo-frame { width: 3.5rem; }
  .record-header h2 { font-size: 1.65rem; }
  .record-profile .record-stamp { display: none; }
}

