/* The original transparent emblem always fits inside its display box. */
.rail-site-icon { position:absolute; top:0; left:0; right:0; height:82px; display:flex; align-items:center; justify-content:center; border-bottom:1px solid #222327; background:#090a0b; }
.rail-site-icon img { width:42px; height:48px; object-fit:contain; }
.rail-site-icon:focus-visible { outline:2px solid #ff0f45; outline-offset:-4px; }
@media(max-width:800px) { .rail-site-icon { display:none; } }

header .brand img[src*="merc-wordmark"] {
  width: 150px;
  height: auto;
  max-width: 150px;
  max-height: 54px;
  object-fit: contain;
  image-rendering: auto;
  display: block;
}
.staff-hq-brand img[src*="merc-wordmark"] { width: 130px; height: auto; max-height: 46px; object-fit: contain; }
.header-discord { display: inline-flex; width: 42px; height: 44px; flex: 0 0 42px; align-items: center; justify-content: center; border: 1px solid #38383e; color: #e5e5eb; transition: color 150ms,border-color 150ms,background 150ms; }
.header-discord svg { width: 23px; height: 23px; }
.header-discord:hover,.header-discord:focus-visible { color: #ff0f45; border-color: #ff0f45; background: #ff0f4510; }
.header-discord:focus-visible { outline: 2px solid #ff0f45; outline-offset: 3px; }
@media(max-width:1100px) { header .brand img[src*="merc-wordmark"] { width: 125px; max-width:125px; } }
@media(max-width:800px) {
  header .brand img[src*="merc-wordmark"] { width:104px; max-width:104px; max-height:42px; }
  .head-right { gap:8px; }
  .head-right .header-discord { width:36px; flex-basis:36px; height:42px; }
  .head-right .header-discord svg { width:21px; height:21px; }
  .head-right .btn-small { padding:12px 10px; font-size:10px; min-height:42px; }
  .head-right .btn-small svg { display:none; }
}
@media(max-width:380px) {
  header { padding-inline:4%; gap:6px; }
  header .brand img[src*="merc-wordmark"] { width:82px; max-width:82px; }
  .head-right { gap:5px; }
  .head-right .header-discord { width:32px; flex-basis:32px; }
  .head-right .btn-small { font-size:9px; padding:12px 9px; }
  .top-nav>a[href="/news"] { font-size:10px; }
}

.about-mark img {
  height: auto;
  aspect-ratio: 1;
}

img[src*="assets/merc-emblem.png"],
img[src*="assets/logo.png"],
img[src="/media/1d8adff5-7860-4c0a-b4e6-0a44db2dd341.png"] {
  object-fit: contain !important;
  object-position: center !important;
  image-rendering: auto !important;
  border-radius: 0 !important;
  clip-path: none !important;
  filter: none !important;
}

/* Keep existing saved member photos that use this cropped emblem in sync. */
img[src="/media/1d8adff5-7860-4c0a-b4e6-0a44db2dd341.png"] {
  content: url('/assets/merc-emblem.png');
}

.brand img[src*="merc-emblem"],
.footer-brand img[src*="merc-emblem"],
.rail-brand img[src*="merc-emblem"],
.side-brand img[src*="merc-emblem"] {
  display: block;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
}

.spotlight-author {
  gap: 14px;
  align-items: center;
}

.spotlight-author img:is([src*="assets/merc-emblem.png"], [src*="assets/logo.png"], [src="/media/1d8adff5-7860-4c0a-b4e6-0a44db2dd341.png"]) {
  display: block;
  width: 46px;
  height: 48px;
  flex: 0 0 46px;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  image-rendering: auto;
}

.spotlight-author > span { min-width: 0; }

@media (max-width: 580px) {
  .spotlight-author { gap: 12px; }
  .spotlight-author img:is([src*="assets/merc-emblem.png"], [src*="assets/logo.png"], [src="/media/1d8adff5-7860-4c0a-b4e6-0a44db2dd341.png"]) { width: 42px; height: 46px; flex-basis: 42px; }
}
