/* Approved Rust Online advert card. Keep page layout and hero independent. */
.server-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #364c5c;
  border-radius: 4px;
  overflow: hidden;
  background: linear-gradient(135deg, #14212a, #101920 80%);
  font-family: Arial, Helvetica, sans-serif;
}
.server-card > * { position: relative; z-index: 1; }
.server-card .card-art {
  display: block;
  position: relative;
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 2.05;
  overflow: hidden;
  background: radial-gradient(ellipse at 70% 20%, #31434c, #14212a 75%);
}
.card-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.server-card .card-art:focus-visible { outline-offset: -4px; }
.server-card .card-online {
  position: absolute;
  right: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #559674;
  border-radius: 2px;
  padding: 5px 9px;
  background: #073222e8;
  color: #a2f3c9;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.card-online .online-dot { width: 7px; height: 7px; }
.server-card .card-delayed { background: #30281ce8; border-color: #81704d; color: #ead09d; }
.server-card .card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 22px; container-type: inline-size; }
.server-card .card-title { font: 700 22px/30px Arial, Helvetica, sans-serif; margin: 0; min-width: 0; letter-spacing: 0; }
.card-title a { display: block; width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; white-space: nowrap; }
.card-title [data-card-title] { display: inline-block; white-space: nowrap; font-size: clamp(10px, 3.7cqi, 22px); }
.card-title a:focus-visible { outline-offset: -2px; }
.server-card .card-subtitle { margin: 8px 0 0; color: #afc3d4; font-size: 15px; line-height: 1.4; }
.server-card .card-icon-label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.server-card .card-meta-icon { display: block; flex-shrink: 0; object-fit: contain; }
.card-subtitle .card-meta-icon { opacity: .82; }
.server-card .card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; padding: 0; margin: 18px 0 0; }
.card-tags li { background: linear-gradient(#1c2d3b, #142330); border: 1px solid #4b6376; border-radius: 0; padding: 5px 8px; color: #dbe5ef; font-size: 12px; line-height: 1.35; }
.server-card .card-population { margin: 24px 0; }
.card-population-label { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 9px; color: #b4c9da; font-size: 16px; line-height: 1.25; }
.card-population-label > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-population-label strong { font-size: 24px; font-weight: 700; color: #f7f9fb; }
.card-capacity { font-size: 16px; }
.card-population-track { height: 11px; border: 1px solid #344c60; border-radius: 2px; overflow: hidden; background: #1a2836; box-shadow: inset 0 1px 3px #0003; }
.card-population-track > span { display: block; height: 100%; background: linear-gradient(90deg, #24ca59 0%, #9bdd46 36%, #ffe052 69%, #ff8a32 100%); }
.card-population-track.is-unknown { border-style: dashed; background: #16212b; }
.server-card .card-voting { margin-top: auto; padding-top: 16px; border-top: 1px solid #344b5b; }
.card-vote-summary { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 16px; font-size: 14px; line-height: 1.3; }
.card-vote-pending { color: #b3c5d2; }
.card-reward { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: #ffdd76; font-weight: 600; }
.card-reward img { display: block; flex-shrink: 0; width: 32px; height: 32px; object-fit: contain; }
.server-card .button { gap: 9px; min-height: 48px; padding: 12px 10px; border-radius: 3px; font: 600 16px/1.3 Arial, Helvetica, sans-serif; text-align: center; }
.server-card .button.secondary { background: #101c27; border-color: #557084; color: #f0f5f9; }
.server-card .button:focus-visible { outline: 3px solid #ff9a75; outline-offset: 3px; }
.card-vote-dialog { width: min(520px, calc(100% - 32px)); max-height: 90vh; max-height: 90dvh; overflow: auto; padding: 0; border: 1px solid #526e82; border-radius: 4px; background: #111e27; color: #eff5fa; }
.card-vote-dialog::backdrop { background: #02070de8; backdrop-filter: blur(4px); }
.card-vote-dialog-body { padding: 32px; }
.card-dialog-coin { display: block; width: 64px; height: 64px; object-fit: contain; margin-bottom: 20px; }
.card-vote-dialog h2 { margin: 0 0 12px; font: 700 27px/1.2 Arial, Helvetica, sans-serif; }
.card-vote-dialog p { margin: 0 0 22px; font: 16px/1.6 Arial, Helvetica, sans-serif; color: #b9cddb; overflow-wrap: anywhere; }
.card-vote-dialog [data-vote-server] { color: #eff5fa; font-weight: 600; }
.card-vote-dialog .button { font-size: 16px; min-height: 46px; border-radius: 3px; }
@media (hover: hover) and (pointer: fine) {
  .server-card { transition: border-color .22s ease, box-shadow .22s ease; }
  .server-card:hover, .server-card:focus-within { border-color: #607f93; box-shadow: 0 12px 30px #0003, inset 0 1px 0 #ffffff0b; }
  .server-card .button { transition: border-color .2s ease, filter .2s ease; }
  .server-card .button:hover { border-color: #a4bdcd; filter: brightness(1.12); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .server-card::before { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s ease; background: radial-gradient(420px circle at var(--hover-x, 50%) var(--hover-y, 50%), #9bc5df18, transparent 72%); }
  .server-card.is-pointer-over::before { opacity: 1; }
  .card-art img { transition: transform .5s cubic-bezier(.22,.61,.36,1); }
  .server-card:hover .card-art img { transform: scale(1.035); }
}
@media (prefers-reduced-motion: reduce) {
  .server-card, .server-card .button, .card-art img { transition: none; }
}
@media (max-width: 420px) {
  .server-card .card-body { padding: 17px; }
  .card-vote-summary { font-size: 12px; gap: 8px; }
  .card-reward { gap: 6px; }
  .card-reward img { width: 28px; height: 28px; }
  .server-card .button { font-size: 15px; }
  .card-tags li { font-size: 11px; padding: 5px 6px; }
  .card-vote-dialog-body { padding: 24px; }
}

/* One quiet disclosure replaces the repeated rows of actions. */
.server-grid { align-items: start; }
.server-card .card-tags { min-height: 29px; }
.card-vote-summary { min-height: 28px; }
.card-action-disclosure { border: 1px solid #496174; border-radius: 2px; background: #14232e; }
.card-action-disclosure > summary { display: flex; justify-content: center; align-items: center; gap: 12px; min-height: 49px; padding: 12px; cursor: pointer; list-style: none; font-size: 15px; font-weight: 700; color: #e7f0f7; transition: background .2s, color .2s; }
.card-action-disclosure > summary::-webkit-details-marker { display: none; }
.card-action-disclosure > summary:hover { background: #243b4a; color: #fff; }
.card-action-disclosure > summary:focus-visible { outline: 2px solid #ff8f65; outline-offset: -3px; }
.card-actions-icon, .card-action-chevron { display: block; flex-shrink: 0; object-fit: contain; }
.card-actions-icon { width: 24px; height: 24px; }
.card-action-disclosure > summary:active { background: #304653; }
.card-action-chevron { transition: transform .2s; }
.card-action-disclosure[open] { border-color: #d86236; background: #0d1922; }
.card-action-disclosure[open] > summary { border-bottom: 1px solid #344b5b; background: #1b2c37; }
.card-action-disclosure[open] .card-action-chevron { transform: rotate(180deg); }
.card-action-tray { display: flex; gap: 5px; padding: 10px; }
.server-card .card-action { display: flex; flex: 1 1 0; min-width: 0; align-items: center; justify-content: center; flex-direction: column; gap: 8px; min-height: 72px; padding: 10px 2px; font-size: clamp(9px, 2.7cqi, 12px); white-space: nowrap; text-transform: uppercase; letter-spacing: .12px; border-radius: 2px; }
.card-action img { display: block; flex-shrink: 0; width: 28px; height: 28px; object-fit: contain; }
.server-card .card-action.primary { background: linear-gradient(135deg, #e84620, #ff581f); border-color: #ff784a; }
.server-card .card-spin-action { display: flex; margin: 0 10px 10px; min-height: 45px; font-size: 14px; gap: 10px; border-color: #8c743a; color: #ffdf8c; background: #27261d; }
.card-spin-action > span { font-size: 12px; font-weight: 400; margin-left: auto; color: #c5b785; }
.card-spin-action img { object-fit: contain; }
.card-manage { display: flex; align-items: center; justify-content: center; width: 100%; }
.card-manage img { display: block; flex-shrink: 0; width: 26px; height: 26px; object-fit: contain; }
.card-address { font-variant-numeric: tabular-nums; color: #97adbd; font-size: 12px; overflow-wrap: anywhere; }
.card-listing-state { color: #d5e5f0; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .card-action img, .card-manage img { transition: transform .2s; }
  .card-action:hover img, .card-manage:hover img { transform: translateY(-2px) scale(1.09); }
  .card-action:active img, .card-manage:active img { transform: scale(.95); }
  .card-action-disclosure[open] .card-action-tray { animation: card-actions-reveal .18s ease-out; }
  @keyframes card-actions-reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 680px) {
  .card-action-tray { flex-direction: column; gap: 8px; padding: 12px; }
  .server-card .card-action { flex-direction: row; justify-content: flex-start; min-height: 48px; padding: 12px 16px; gap: 14px; font-size: 13px; }
  .server-card .card-spin-action { margin: 0 12px 12px; }
}
@media (prefers-reduced-motion: reduce) { .card-action-chevron, .card-action-disclosure > summary { transition: none; } }
/* Region and recent wipe sit below the artwork, outside the title area. */
.server-card .card-meta-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-height: 46px; padding: 7px 22px; border-bottom: 1px solid #2b3c48; background: #0e1a22; }
.server-card .card-region { color: #afc4d4; font-size: 13px; white-space: nowrap; }
@media (max-width: 420px) { .server-card .card-meta-strip { padding-inline: 17px; } }

/* Public vote totals open the server's voter page. */
.card-votes-link { min-height: 44px; gap: 8px; border-radius: 4px; padding: 4px 7px; margin: -4px -7px; transition: color .16s, background .16s; }
.card-votes-link:hover { color: #fff; background: #31506666; }
.card-votes-link:focus-visible { outline: 2px solid #ff996a; outline-offset: 3px; }
.card-votes-link:active { background: #41698480; }
.card-votes-arrow { transform: rotate(-90deg); opacity: .6; transition: transform .16s, opacity .16s; }
.card-votes-link:hover .card-votes-arrow { transform: translateX(3px) rotate(-90deg); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .card-votes-link, .card-votes-arrow { transition: none; } .card-votes-link:hover .card-votes-arrow { transform: rotate(-90deg); } }
