/* Compact member dossier and ordered ship-card entrances. */
#view-profile {
  padding-top: 22px;
  padding-bottom: 88px;
}

#view-profile .profile-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

#view-profile .profile-nav .back-to-registry {
  margin: 0;
  padding: 8px 13px;
  min-height: 40px;
  font-size: 12px;
}

#view-profile .profile-page-label {
  color: var(--theme-muted, var(--muted));
  font-size: 10px;
  letter-spacing: .17em;
  text-align: right;
}

#view-profile .profile-top.profile-no-avatar.profile-dossier {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 32px;
  max-width: none;
  min-height: 0;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--theme-line, var(--line));
}

#view-profile .profile-dossier .profile-intro {
  min-width: 0;
  max-width: none;
}

#view-profile .profile-intro h1 {
  margin: -3px 0 14px;
  color: var(--theme-ink, var(--white));
  font-size: clamp(44px, 4.7vw, 64px);
  line-height: 1.12;
  letter-spacing: .015em;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: none;
}

#view-profile .profile-intro h1.is-long-name {
  font-size: clamp(36px, 4vw, 54px);
  letter-spacing: .005em;
}

#view-profile .profile-intro h1.is-extra-long-name {
  font-size: clamp(30px, 3.4vw, 46px);
  letter-spacing: 0;
}

#view-profile .profile-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
}

#view-profile .profile-identity .profile-pills {
  margin: 0;
  gap: 7px;
}

#view-profile .profile-pills span {
  padding: 7px 11px;
  font-size: 12px;
  line-height: 1.45;
}

#view-profile .profile-identity .profile-department {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  min-width: 0;
  max-width: 100%;
  gap: 5px 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

#view-profile .profile-department small {
  color: var(--theme-muted, var(--muted));
  font-size: 10px;
  letter-spacing: .08em;
}

#view-profile .profile-department strong {
  color: var(--theme-ink, var(--white));
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

#view-profile .profile-department.is-unassigned strong {
  color: var(--theme-muted, var(--muted));
  font-size: 13px;
  font-weight: 400;
}

#view-profile .profile-callsign {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.7;
}

#view-profile .profile-bio {
  max-width: 66ch;
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.85;
}

#view-profile .profile-discord {
  max-width: none;
  margin-top: 16px;
  padding: 14px 16px;
}

#view-profile .profile-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  align-items: start;
  gap: 18px;
  min-width: 0;
  padding: 4px 0 2px 24px;
  border-left: 1px solid var(--theme-line, var(--line));
}

#view-profile .profile-fleet-total:only-child { grid-column: 1 / -1; }

#view-profile .profile-summary-label {
  display: block;
  color: var(--theme-muted, var(--muted));
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: .16em;
}

#view-profile .profile-ship-count {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 10px;
}

#view-profile .profile-ship-count strong {
  color: var(--theme-red, var(--red));
  font: 500 60px/.98 Oswald, Impact, sans-serif;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}

#view-profile .profile-ship-count > span {
  color: var(--theme-muted, var(--muted));
  font-size: 12px;
  line-height: 1.6;
}

#view-profile .profile-fleet-jump {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 21px;
  padding: 0 0 7px;
  border: 0;
  border-bottom: 1px solid var(--theme-line, var(--line));
  background: transparent;
  color: var(--theme-ink, var(--white));
  font: inherit;
  font-size: 12px;
  line-height: 1.6;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease;
}

#view-profile .profile-fleet-jump > span {
  display: inline-block;
  color: var(--theme-red, var(--red));
  font-size: 19px;
  line-height: 1;
  transition: transform 200ms ease;
}

#view-profile .profile-fleet-jump:is(:hover, :focus-visible) {
  border-color: var(--theme-red, var(--red));
}

#view-profile .profile-fleet-jump:focus-visible,
#view-profile .profile-ship-grid > .fleet-card:focus-visible {
  outline: 2px solid var(--theme-red, var(--red));
  outline-offset: 4px;
}

#view-profile .profile-tenure {
  min-width: 0;
  margin: 0;
  padding: 0 0 0 18px;
  border-left: 1px solid var(--theme-line, var(--line));
}

#view-profile .profile-tenure > span,
#view-profile .profile-tenure p > span {
  color: var(--theme-muted, var(--muted));
  font-size: 11px;
  line-height: 1.6;
}

#view-profile .profile-tenure p {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0 0;
}

#view-profile .profile-tenure p > strong {
  color: var(--theme-ink, var(--white));
  font: 500 30px/1.25 Oswald, Impact, sans-serif;
  font-variant-numeric: tabular-nums;
}

#view-profile .profile-vessels-head {
  align-items: end;
  gap: 22px;
  margin: 20px 0 16px;
}

#view-profile .profile-vessels-head .eyebrow {
  font-size: 9px;
  letter-spacing: .16em;
}

#view-profile .profile-vessels-head h2 {
  margin: 7px 0 0;
  font-size: clamp(28px, 2.5vw, 34px);
  line-height: 1.2;
}

#view-profile .profile-vessels-head h2 em {
  font-size: 16px;
  margin-left: 10px;
}

#view-profile .profile-vessels-head > a {
  padding-bottom: 3px;
  line-height: 1.6;
  white-space: nowrap;
}

#view-profile #profile-vessels,
#view-profile #profile-vessels-title {
  scroll-margin-top: calc(var(--header-height, 82px) + 28px);
}

#view-profile .profile-ship-grid > .blank {
  grid-column: 1 / -1;
}

#view-profile .profile-ship-grid > .fleet-card {
  transform: none;
  transition: border-color 200ms ease, background-color 200ms ease;
}

#view-profile .profile-ship-grid > .fleet-card:is(:hover, :focus-visible) {
  border-color: var(--theme-red, var(--red));
}

#view-profile .fleet-footer > b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#view-profile .profile-card-arrow {
  display: inline-block;
  transition: transform 200ms ease;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #view-profile .profile-fleet-jump:hover > span { transform: translateY(2px); }
  #view-profile .fleet-card:hover .profile-card-arrow { transform: translate(2px, -2px); }
}

@media (max-width: 1000px) {
  #view-profile .profile-top.profile-no-avatar.profile-dossier {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
  }
  #view-profile .profile-summary {
    grid-template-columns: minmax(0, 1fr) 90px;
    gap: 14px;
    padding-left: 18px;
  }
  #view-profile .profile-ship-count strong { font-size: 54px; }
  #view-profile .profile-ship-count > span { font-size: 11px; }
  #view-profile .profile-tenure { padding-left: 14px; }
  #view-profile .profile-discord { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

@media (max-width: 740px) {
  #view-profile {
    padding-top: 18px;
    padding-bottom: 64px;
  }
  #view-profile .profile-nav {
    gap: 14px;
    margin-bottom: 18px;
  }
  #view-profile .profile-nav .back-to-registry {
    padding: 7px 10px;
    min-height: 37px;
    font-size: 11px;
    gap: 8px;
  }
  #view-profile .profile-page-label {
    max-width: 118px;
    font-size: 8px;
    line-height: 1.7;
    letter-spacing: .10em;
  }
  #view-profile .profile-top.profile-no-avatar.profile-dossier {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-bottom: 18px;
  }
  #view-profile .profile-intro h1 {
    margin: 0 0 14px;
    font-size: clamp(37px, 9.2vw, 50px);
  }
  #view-profile .profile-intro h1.is-long-name { font-size: clamp(32px, 8.2vw, 46px); }
  #view-profile .profile-intro h1.is-extra-long-name { font-size: clamp(29px, 7.4vw, 40px); }
  #view-profile .profile-identity { gap: 10px 17px; }
  #view-profile .profile-department strong { font-size: 13px; }
  #view-profile .profile-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(94px, .65fr);
    align-items: start;
    gap: 16px;
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid var(--theme-line, var(--line));
  }
  #view-profile .profile-summary-label { font-size: 8px; }
  #view-profile .profile-ship-count {
    gap: 10px;
    margin: 6px 0 10px;
  }
  #view-profile .profile-ship-count strong { font-size: 46px; }
  #view-profile .profile-ship-count > span { font-size: 11px; }
  #view-profile .profile-fleet-jump { font-size: 11px; gap: 17px; }
  #view-profile .profile-tenure {
    display: block;
    margin: 0;
    padding: 0 0 0 16px;
    border-top: 0;
    border-left: 1px solid var(--theme-line, var(--line));
  }
  #view-profile .profile-tenure > span { font-size: 10px; }
  #view-profile .profile-tenure p { margin-top: 10px; }
  #view-profile .profile-tenure p > strong { font-size: 28px; }
  #view-profile .profile-vessels-head {
    align-items: end;
    gap: 15px;
    margin-top: 20px;
  }
  #view-profile .profile-vessels-head > a { font-size: 10px; }
  #view-profile .profile-vessels-head h2 em { font-size: 14px; margin-left: 6px; }
  #view-profile .profile-discord { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  #view-profile .profile-fleet-jump,
  #view-profile .profile-fleet-jump > span,
  #view-profile .profile-ship-grid > .fleet-card,
  #view-profile .profile-card-arrow,
  #view-profile .fleet-image > img { transition: none; }
  #view-profile .profile-fleet-jump:hover > span,
  #view-profile .fleet-card:hover .profile-card-arrow,
  #view-profile .fleet-card:hover .fleet-image > img { transform: none; }
}

.action-motion-off #view-profile .profile-fleet-jump > span,
.action-motion-off #view-profile .profile-card-arrow,
.action-motion-off #view-profile .fleet-card:hover .fleet-image > img {
  transition: none;
  transform: none;
}

/* Cards wait slightly below their final position without being hidden. */
#fleet-list > .fleet-stack-group.ship-card-motion-pending,
#profile-content .profile-ship-grid > .fleet-card.ship-card-motion-pending,
#model-content .model-vessel-grid > .model-vessel.ship-card-motion-pending {
  translate: 0 28px;
}

@media (prefers-reduced-motion: reduce) {
  #fleet-list > .fleet-stack-group.ship-card-motion-pending,
  #profile-content .profile-ship-grid > .fleet-card.ship-card-motion-pending,
  #model-content .model-vessel-grid > .model-vessel.ship-card-motion-pending {
    translate: none;
  }
}

.action-motion-off #fleet-list > .fleet-stack-group.ship-card-motion-pending,
.action-motion-off #profile-content .profile-ship-grid > .fleet-card.ship-card-motion-pending,
.action-motion-off #model-content .model-vessel-grid > .model-vessel.ship-card-motion-pending {
  translate: none;
}
