/* The Battlefield Heroes site's design system, shared by the landing page (/play/heroes/) and the backend's
   lobby (/heroes/, which links it as /play/heroes/ui/bfh.css). H1459: a homage to the old Revive Heroes site
   (retail/node-heroes-web-master; notes/bfheroes/site_design.md): its deep sky, the red bar with white
   outlined lowercase links and the yellow hover, parchment panels with a thick ink border and a hard shadow,
   glossy bar buttons. Fonts (fonts/FONTS.txt): Fredoka SemiBold (bar, buttons, headings; OFL) in place of the
   old site's Sofia Pro, Luckiest Guy (big titles; Apache 2.0). Not retail: neither site was EA's.
   The older variable names (H1422) stay and point at the homage values, so pages built on them follow. */
@font-face {
  font-family: 'BFH Display'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/luckiest-guy.woff2) format('woff2');
}
@font-face {
  font-family: 'BFH UI'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/fredoka-semibold.woff2) format('woff2');
}
:root {
  /* The homage palette (site_design.md "Tokens"). */
  --bfh-sky-deep: #0f417e; --bfh-sky: #2f6fb3; --bfh-horizon: #a9d0f0; --bfh-sea: #4c738f;
  --bfh-red-bar: #8b322e; --bfh-red-bar-2: #6d2522; --bfh-night: #1d1213; --bfh-hover: #fede01;
  --bfh-parch: #d7c8af; --bfh-parch-2: #c9b796; --bfh-row: #e8e3d9; --bfh-row-2: #dad3c5;
  --bfh-go: #328b2e; --bfh-go-2: #24661f; --bfh-stop: #8b322e; --bfh-camo: #6f8f3a; --bfh-camo-2: #3f5420;
  --bfh-font-bar: 'BFH UI', 'Fredoka', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
  --bfh-outline: 2px 1px 0 var(--bfh-ink), -2px 1px 0 var(--bfh-ink), -2px -1px 0 var(--bfh-ink), 2px -1px 0 var(--bfh-ink),
    1px 2px 0 var(--bfh-ink), -1px 2px 0 var(--bfh-ink), -1px -2px 0 var(--bfh-ink), 1px -2px 0 var(--bfh-ink),
    2px 2px 0 var(--bfh-ink), -2px 2px 0 var(--bfh-ink), -2px -2px 0 var(--bfh-ink), 2px -2px 0 var(--bfh-ink);
  --bfh-outline-thin: 1px 1px 0 var(--bfh-ink), -1px 1px 0 var(--bfh-ink), -1px -1px 0 var(--bfh-ink), 1px -1px 0 var(--bfh-ink),
    0 2px 0 var(--bfh-ink);
  --bfh-hard-shadow: 0 2px 11px rgba(0, 0, 0, 0.85);
  /* The H1422 names, now on the homage values. */
  --bfh-ink: #14100c;
  --bfh-paper: var(--bfh-parch); --bfh-paper-2: var(--bfh-parch-2); --bfh-paper-3: var(--bfh-row); --bfh-paper-ink: #2a2016; --bfh-paper-dim: #6b5d48;
  --bfh-blue: #2f6fb3; --bfh-blue-2: #0f417e; --bfh-blue-3: #4a8ad0;
  --bfh-red: var(--bfh-red-bar); --bfh-red-2: var(--bfh-red-bar-2); --bfh-red-3: #b04540;
  --bfh-green: #3fa53a; --bfh-green-2: var(--bfh-go);
  --bfh-gold: var(--bfh-hover); --bfh-orange: #ff9a0d; --bfh-orange-2: #c96a00;
  --bfh-cream: #fff8ea; --bfh-ok: #9fe07a; --bfh-err: #ff8b6e;
  --bfh-font-display: 'BFH Display', 'Luckiest Guy', 'Arial Black', Impact, sans-serif;
  --bfh-font-ui: var(--bfh-font-bar);
  --bfh-font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --bfh-radius: 6px;
  --bfh-shadow: var(--bfh-hard-shadow);
}

/* Type */
.bfh-outline { color: #fff; text-shadow: var(--bfh-outline); }
.bfh-title, .bfh-h1 { font: 400 clamp(28px, 5vw, 44px)/1 var(--bfh-font-display); letter-spacing: 1px; color: #fff;
  text-shadow: var(--bfh-outline), 0 5px 0 var(--bfh-ink); margin: 0; }
.bfh-h2 { font: 600 22px/1.1 var(--bfh-font-ui); letter-spacing: 0.2px; color: var(--bfh-paper-ink); margin: 0 0 8px; text-transform: lowercase; }
.bfh-h2 small, .bfh-h2 a { font: 13px/1 var(--bfh-font-body); color: var(--bfh-paper-dim); margin-left: 8px; text-transform: none; }
.bfh-ui { font-family: var(--bfh-font-ui); }
.bfh-small { font-size: 13px; color: var(--bfh-paper-dim); }

/* The red bar (the old site's .nav-heroes): white outlined lowercase links, yellow on hover. */
.bfh-bar { display: flex; align-items: center; gap: clamp(10px, 2vw, 28px); min-height: 56px; padding: 0 clamp(12px, 2.5vw, 32px);
  background: linear-gradient(180deg, #9a3833 0%, var(--bfh-red-bar) 55%, var(--bfh-red-bar-2) 100%);
  border-bottom: 3px solid var(--bfh-ink); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
  font: 600 20px/1 var(--bfh-font-bar); color: #fff; text-shadow: var(--bfh-outline); box-sizing: border-box; }
.bfh-bar a, .bfh-bar button.bfh-link { color: #fff; text-decoration: none; text-transform: lowercase; background: none; border: 0; padding: 6px 0;
  font: inherit; text-shadow: inherit; cursor: pointer; transition: color 0.12s; }
.bfh-bar a:hover, .bfh-bar a:focus-visible, .bfh-bar button.bfh-link:hover, .bfh-bar .active { color: var(--bfh-hover); }
.bfh-bar a:focus-visible, .bfh-bar button:focus-visible { outline: 3px solid var(--bfh-hover); outline-offset: 3px; border-radius: 4px; }
.bfh-bar .bfh-brand { font-size: 22px; text-transform: none; white-space: nowrap; }
.bfh-bar .bfh-spacer { flex: 1; }

/* Panels: the old site's parchment (.panel-paper) with an ink edge and a hard shadow; red / dark / blue variants. */
.bfh-panel { position: relative; background: linear-gradient(180deg, #e3d7c1, var(--bfh-parch) 40%, var(--bfh-parch-2));
  color: var(--bfh-paper-ink); border: 3px solid var(--bfh-ink); border-radius: var(--bfh-radius); padding: 18px 20px;
  box-shadow: var(--bfh-shadow); font: 15px/1.45 var(--bfh-font-body); }
.bfh-panel::before { content: ''; position: absolute; inset: 0; border-radius: calc(var(--bfh-radius) - 3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(0, 0, 0, 0.12); pointer-events: none; }
.bfh-panel-blue { background: linear-gradient(180deg, var(--bfh-blue-3), var(--bfh-blue) 50%, var(--bfh-blue-2)); color: var(--bfh-cream);
  --bfh-paper-ink: var(--bfh-cream); --bfh-paper-dim: #c7d8ee; }
.bfh-panel-red { background: linear-gradient(180deg, var(--bfh-red-3), var(--bfh-red) 50%, var(--bfh-red-2)); color: var(--bfh-cream);
  --bfh-paper-ink: var(--bfh-cream); --bfh-paper-dim: #ecc9c3; }
.bfh-panel-dark { background: linear-gradient(180deg, #3a2a28, #241817 60%, var(--bfh-night)); color: var(--bfh-cream);
  --bfh-paper-ink: var(--bfh-cream); --bfh-paper-dim: #c2b3a8; }
.bfh-panel a { color: var(--bfh-red-bar); font-weight: 600; }
.bfh-panel-blue a, .bfh-panel-red a, .bfh-panel-dark a { color: var(--bfh-hover); }
/* A heading strip across a panel's top: the red bar in small. */
.bfh-panel-head { margin: -18px -20px 14px; padding: 11px 20px 10px; color: #fff; text-shadow: var(--bfh-outline);
  background: linear-gradient(180deg, #9a3833, var(--bfh-red-bar) 60%, var(--bfh-red-bar-2)); border-bottom: 3px solid var(--bfh-ink);
  border-radius: calc(var(--bfh-radius) - 3px) calc(var(--bfh-radius) - 3px) 0 0; font: 600 21px/1.1 var(--bfh-font-ui); text-transform: lowercase; }
/* Alternating list rows (the old soldier / server lists). */
.bfh-rows > * { background: var(--bfh-row); border-radius: 6px; }
.bfh-rows > *:nth-child(2n) { background: var(--bfh-row-2); }

/* Buttons: the old site's glossy bars (buttons_large.png) - a lit top half, an ink border, white outlined text. */
.bfh-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box;
  font: 600 18px/1 var(--bfh-font-ui); letter-spacing: 0.3px; text-transform: lowercase; text-decoration: none;
  color: var(--bfh-paper-ink); background: linear-gradient(180deg, #f4eee2 0%, #e2d8c4 50%, #cdbf9f 51%, #d9cdb2 100%);
  border: 3px solid var(--bfh-ink); border-radius: 7px; padding: 10px 20px; min-height: 44px; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 3px 0 var(--bfh-ink); transform: translateY(0);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s; -webkit-tap-highlight-color: transparent; user-select: none; white-space: nowrap; }
.bfh-btn:hover { filter: brightness(1.08) saturate(1.05); }
.bfh-btn:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 0 var(--bfh-ink); }
.bfh-btn:focus-visible { outline: 3px solid var(--bfh-hover); outline-offset: 2px; }
.bfh-btn:disabled, .bfh-btn[aria-disabled=true] { filter: grayscale(0.7) brightness(0.85); cursor: default; transform: none; }
.bfh-btn-play, .bfh-btn-blue, .bfh-btn-red, .bfh-btn-green { color: #fff; text-shadow: var(--bfh-outline-thin); }
.bfh-btn-play { background: linear-gradient(180deg, #ffe066 0%, #ffcc1a 48%, #f2a600 52%, #ffbf1f 100%); text-shadow: var(--bfh-outline); }
.bfh-btn-blue { background: linear-gradient(180deg, #6fa7dc 0%, #4a8ad0 48%, #2f6fb3 52%, #3d7fc4 100%); }
.bfh-btn-red { background: linear-gradient(180deg, #d0605a 0%, #b04540 48%, #8b322e 52%, #a03b36 100%); }
.bfh-btn-green { background: linear-gradient(180deg, #6cc25f 0%, #4aa93f 48%, #328b2e 52%, #3d9a36 100%); }
.bfh-btn-ghost { color: #fff; text-shadow: var(--bfh-outline-thin); background: rgba(20, 16, 12, 0.45); border-color: rgba(255, 255, 255, 0.75);
  box-shadow: none; backdrop-filter: blur(4px); }
.bfh-btn-ghost:active { transform: none; }
.bfh-btn-sm { font-size: 15px; padding: 6px 12px; min-height: 32px; border-width: 2px; border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 0 var(--bfh-ink); }
.bfh-btn-sm:active { transform: translateY(2px); }
.bfh-btn-lg { font-size: 26px; padding: 14px 36px; min-height: 64px; border-radius: 9px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.55), 0 5px 0 var(--bfh-ink); }
.bfh-btn-lg:active { transform: translateY(4px); }

/* Fields */
.bfh-input, .bfh-select { box-sizing: border-box; width: 100%; font: 16px/1.3 var(--bfh-font-body); color: var(--bfh-paper-ink);
  background: #fffaf0; border: 2px solid var(--bfh-ink); border-radius: 6px; padding: 10px 12px; margin: 4px 0;
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.1); }
.bfh-input:focus, .bfh-select:focus { outline: 3px solid var(--bfh-hover); outline-offset: 0; }
.bfh-input::placeholder { color: #8d826c; }
.bfh-label { display: block; font: 600 14px/1.2 var(--bfh-font-ui); color: var(--bfh-paper-dim); margin: 10px 0 2px; text-transform: lowercase; }

/* Badges and pills */
.bfh-badge { display: inline-flex; align-items: center; gap: 8px; font: 600 15px/1 var(--bfh-font-ui); color: #fff; text-shadow: var(--bfh-outline-thin);
  background: rgba(15, 30, 55, 0.55); border: 2px solid rgba(255, 255, 255, 0.45); border-radius: 999px; padding: 8px 14px; backdrop-filter: blur(4px); }
.bfh-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bfh-ok); box-shadow: 0 0 8px var(--bfh-ok); }
.bfh-badge.off .dot { background: #9a9385; box-shadow: none; }
.bfh-tag { display: inline-block; font: 600 12px/1 var(--bfh-font-ui); text-transform: lowercase; padding: 4px 8px;
  border-radius: 5px; border: 2px solid var(--bfh-ink); background: var(--bfh-row); color: var(--bfh-paper-ink); }
.bfh-tag-national { background: var(--bfh-red); color: #fff; text-shadow: var(--bfh-outline-thin); }
.bfh-tag-royal { background: var(--bfh-blue); color: #fff; text-shadow: var(--bfh-outline-thin); }

/* The retail menu's small icons (img/icons.webp, 34 px each): classes, factions, level. */
.bfh-icon { display: inline-block; width: 34px; height: 34px; background: url(img/icons.webp) no-repeat 0 0 / 204px 34px; vertical-align: middle;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.4)); }
.bfh-icon-commando { background-position: 0 0; }
.bfh-icon-soldier { background-position: -34px 0; }
.bfh-icon-gunner { background-position: -68px 0; }
.bfh-icon-national { background-position: -102px 0; }
.bfh-icon-royal { background-position: -136px 0; }
.bfh-icon-level { background-position: -170px 0; }

/* The red brush ribbon (img/banner.webp) behind a heading. */
.bfh-ribbon { position: relative; display: inline-block; padding: 10px 28px 14px; color: #fff; font: 600 22px/1 var(--bfh-font-ui);
  text-transform: lowercase; text-shadow: var(--bfh-outline); }
.bfh-ribbon::before { content: ''; position: absolute; inset: -6px -10px -14px; background: url(img/banner.webp) no-repeat center / 100% 100%; z-index: -1; }

/* The sky behind a page that is not the landing (the lobby, the creator): the old site's background. */
.bfh-sky { background: var(--bfh-sky-deep) url(img/clouds_1280.webp) center bottom / cover no-repeat fixed; }
@media (min-width: 1300px) { .bfh-sky { background-image: url(img/clouds_2560.webp); } }

/* Messages */
.bfh-msg { min-height: 1.3em; font: 14px/1.4 var(--bfh-font-body); }
.bfh-msg.ok, .ok { color: var(--bfh-go-2); }
.bfh-msg.error, .error { color: var(--bfh-red); }
.bfh-panel-blue .ok, .bfh-panel-red .ok, .bfh-panel-dark .ok { color: var(--bfh-ok); }
.bfh-panel-blue .error, .bfh-panel-red .error, .bfh-panel-dark .error { color: var(--bfh-err); }

@media (prefers-reduced-motion: reduce) {
  .bfh-btn, .bfh-bar a { transition: none; }
}
