/* Halo 3 Online website. The look follows the Windows launcher (port/packaging/launcher_windows_ui.h):
   black to deep blue, thin frame lines that fade out at the edges, boxes with their top right and
   bottom left corners cut off, Lato, and one amber button. */
:root {
    color-scheme: dark;
    --title: #a9c3d8;      /* COL_TITLE */
    --text: #ffffff;       /* COL_TEXT */
    --label: #9cc2e0;      /* COL_LABEL */
    --outline: #587076;    /* COL_OUTLINE */
    --line: #608cac;       /* COL_LINE */
    --field: #03090d;      /* COL_FIELD */
    --done: #009ec5;       /* COL_DONE */
    --avatar: #416079;     /* COL_AVATAR */
    --amber: #edab32;      /* COL_UPDATE */
    --amber-hot: #f8c258;
    --amber-down: #d49626;
    --muted: #8da3b4;
    --font: "Lato", "Segoe UI", system-ui, sans-serif;
    --col: 760px;
    --wide: 1180px;
}

* { box-sizing: border-box; }

html {
    background: #000;
}

body {
    margin: 0;
    color: var(--text);
    font: 400 16px/1.6 var(--font);
    /* The launcher's gradient: black at the top, deep blue (18, 46, 63) arriving late at the bottom. */
    background:
        linear-gradient(180deg,
            rgb(0, 0, 0) 0%,
            rgb(1, 3, 4) 25%,
            rgb(4, 11, 15) 45%,
            rgb(9, 23, 31) 65%,
            rgb(13, 35, 48) 82%,
            rgb(18, 46, 63) 100%) fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--label); text-decoration: none; }
a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--label); }

h1, h2, h3, h4 { font-weight: 400; line-height: 1.25; margin: 0 0 0.5em; color: var(--text); }

code {
    font: 0.88em/1 ui-monospace, Consolas, monospace;
    color: var(--title);
    background: rgba(96, 140, 172, 0.12);
    padding: 0.15em 0.35em;
}

.col { width: 100%; max-width: var(--col); margin: 0 auto; padding: 0 16px; }
.wide { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 16px; }

/* Spaced capitals, like the launcher's "H A L O  3" title. */
.spaced {
    font-size: 15px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--title);
}

/* ---------- Top row: logo and links | title | version and Download ---------- */
.top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 16px;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding: 30px 40px 0;
}
.top-left { display: flex; align-items: center; gap: 26px; min-width: 0; min-height: 54px; }
.logo { display: block; width: 64px; flex-shrink: 0; }
.logo img { display: block; width: 100%; height: auto; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { font-size: 15px; color: var(--label); }
.nav a[aria-current="page"] { color: var(--text); }

.site-title {
    font-size: 20px;
    letter-spacing: 0.25em;
    padding-left: 0.25em;
    color: var(--title);
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 54px;
}
.site-title:hover { color: var(--text); text-decoration: none; }

.top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.version { font-size: 20px; color: var(--title); line-height: 54px; min-height: 54px; }

/* The amber button: a filled box with its bottom right corner cut and an arrow at its right end. */
.amber {
    display: inline-flex;
    align-items: center;
    gap: 26px;
    background: var(--amber);
    color: #000;
    font-size: 15px;
    padding: 7px 12px 7px 11px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 7px) 100%, 0 100%);
    white-space: nowrap;
}
.amber:hover { background: var(--amber-hot); color: #000; text-decoration: none; }
.amber:active { background: var(--amber-down); }
.amber svg { width: 15px; height: 17px; flex-shrink: 0; }

/* ---------- The frame lines ---------- */
/* Drawn at the launcher size (1280 wide) and centred: wider screens see the lines fade out, narrow ones see the middle. */
.frame { display: flex; justify-content: center; overflow: hidden; pointer-events: none; }
.frame svg { flex-shrink: 0; display: block; }
.frame path { fill: none; stroke-width: 1; }
.frame-top { margin-top: 6px; }

/* ---------- The launcher's box: top right and bottom left corners cut off ----------
   ::before draws the 1px outline (the outer shape minus the inner one), ::after the hover glow. */
.cut {
    --c: 22px;
    --o: var(--outline);
    position: relative;
    isolation: isolate;
}
.cut::before, .cut::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cut::before {
    background: var(--o);
    clip-path: polygon(evenodd,
        0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)), 0 0,
        1px 1px, 1px calc(100% - var(--c) - 0.41px), calc(var(--c) + 0.41px) calc(100% - 1px), calc(100% - 1px) calc(100% - 1px),
        calc(100% - 1px) calc(var(--c) + 0.41px), calc(100% - var(--c) - 0.41px) 1px, 1px 1px);
}
.cut::after {
    background: var(--label);
    opacity: 0;
    clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
    transition: opacity 0.12s;
}
a.cut:hover, .cut.hover:hover { --o: var(--label); text-decoration: none; }
a.cut:hover::after, .cut.hover:hover::after { opacity: 0.07; }
a.cut:active::after { opacity: 0.14; }
.cut.card { --c: 18px; padding: 22px 26px; }

/* The big "Play"-style button. */
.play {
    --c: 43px;
    display: inline-grid;
    place-items: center;
    width: 260px;
    height: 102px;
    font-size: 32px;
    letter-spacing: -0.04em;
    color: var(--label);
}
.play:hover { --o: var(--text); color: var(--text); }
.play small { display: block; font-size: 14px; letter-spacing: 0; color: var(--title); margin-top: 4px; text-align: center; }
.play span { line-height: 1.1; text-align: center; }

/* ---------- Main ---------- */
main { flex: 1; padding-bottom: 24px; }

.hero { text-align: center; padding: 34px 0 10px; }
.hero h1 { font-size: clamp(34px, 6vw, 52px); font-weight: 300; margin-bottom: 10px; }
.hero .lead { color: var(--label); font-size: 18px; max-width: 600px; margin: 0 auto 40px; }
.hero .fine { font-size: 14px; color: var(--text); margin: 26px auto 0; max-width: 560px; }

/* A row of small links, like the launcher's bottom row. */
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 42px; font-size: 14px; margin-top: 26px; }

.status { display: flex; justify-content: center; align-items: center; gap: 10px; font-size: 14px; color: var(--label); margin: 46px 0 0; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--outline); }
.status.on .dot { background: var(--done); box-shadow: 0 0 8px var(--done); }
.status b { color: var(--text); font-weight: 400; }

.section { margin-top: 72px; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { font-size: 22px; margin: 0; }
.section-head p { color: var(--label); font-size: 15px; margin: 6px 0 0; }

.grid { display: grid; gap: 22px; }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card h3 { font-size: 18px; color: var(--label); margin-bottom: 8px; }
.card p { font-size: 14px; margin: 0; color: var(--text); }
.card p + p { margin-top: 10px; }
.card .tickrow { color: var(--done); font-size: 14px; margin-top: 12px; }

/* Ticks, as drawn by the launcher next to "Game added". */
.tick { display: inline-block; width: 12px; height: 9px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(-48deg); margin: 0 4px 0 2px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; font-size: 15px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 1.5px solid var(--done); border-bottom: 1.5px solid var(--done); transform: rotate(-48deg); }

/* ---------- News ---------- */
.news-list { display: grid; gap: 18px; }
.news-item { display: block; color: var(--text); }
.news-item:hover { color: var(--text); }
.meta { font-size: 13px; color: var(--title); margin-bottom: 6px; }
.meta .ver { color: var(--done); margin-right: 10px; }
.news-item h3 { font-size: 20px; margin-bottom: 6px; color: var(--text); }
.news-item p { font-size: 15px; color: var(--label); margin: 0; }
.news-item .more { display: inline-block; margin-top: 10px; font-size: 14px; color: var(--label); }
.news-item:hover .more { color: var(--text); text-decoration: underline; text-underline-offset: 5px; }

.page-head { text-align: center; padding: 26px 0 30px; }
.page-head h1 { font-size: 30px; margin-bottom: 6px; }
.page-head p { color: var(--label); margin: 0 auto; max-width: 560px; font-size: 15px; }

.article { padding: 30px 34px 26px; scroll-margin-top: 20px; }
.article h1 { font-size: 28px; margin-bottom: 18px; }
.article h3 { font-size: 18px; color: var(--label); margin: 28px 0 10px; }
.article p, .article li { font-size: 15px; }
.article ul { padding-left: 18px; margin: 0; }
.article li { margin-bottom: 8px; }
.article li::marker { color: var(--done); }
.article strong { font-weight: 700; }
.article .foot { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; margin-top: 26px; font-size: 14px; }

.back { display: block; text-align: center; font-size: 14px; margin: 28px 0 0; }

/* ---------- How to play ---------- */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 16px 46px; font-size: 15px; }
.steps > li:last-child { padding-bottom: 0; }
.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -3px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--avatar);
    color: #040b10;
    font-weight: 700;
    display: grid;
    place-items: center;
}
.steps .note { display: block; color: var(--label); font-size: 14px; margin-top: 3px; }
.card h2 { font-size: 22px; margin-bottom: 18px; }
.card .after { font-size: 14px; color: var(--label); margin: 18px 0 0; }
.qa { margin: 0; }
.qa dt { color: var(--label); margin-top: 16px; font-size: 15px; }
.qa dt:first-child { margin-top: 0; }
.qa dd { margin: 3px 0 0; font-size: 15px; }
.stack { display: grid; gap: 22px; }

/* ---------- Loading ---------- */
.placeholder { color: var(--label); font-size: 14px; text-align: center; padding: 18px 0; }
.skeleton { height: 12px; background: linear-gradient(90deg, #0b1820, #17303f, #0b1820); background-size: 200% 100%; animation: shimmer 1.4s infinite; margin: 0 0 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Bottom: the frame's arc with its tab, and the link row ---------- */
.bottom { margin-top: 40px; }
.tab-links { display: flex; justify-content: center; gap: 36px; font-size: 14px; margin-top: 4px; }
.legal { text-align: center; font-size: 13px; color: var(--muted); max-width: 640px; margin: 34px auto 0; padding: 0 16px 28px; }

[hidden] { display: none !important; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1000px) {
    .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid.three { grid-template-columns: minmax(0, 1fr); }
    .top { padding: 22px 16px 0; }
}
@media (max-width: 760px) {
    .top { grid-template-columns: 1fr auto; row-gap: 4px; }
    .site-title { grid-column: 1; grid-row: 1; justify-self: start; font-size: 17px; letter-spacing: 0.18em; padding-left: 0; line-height: 40px; }
    .top-left { grid-column: 1 / -1; grid-row: 2; }
    .logo { display: none; }
    .top-right { grid-column: 2; grid-row: 1; }
    .version { display: none; }
    .grid.four { grid-template-columns: minmax(0, 1fr); }
    .article { padding: 24px 20px 20px; }
    .cut.card { padding: 20px; }
    .tab-links { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } .cut::after { transition: none; } }

.credit { text-align: center; font-size: 14px; color: var(--label); margin: 26px 0 0; }
.credit + .legal { margin-top: 10px; }

/* No lone words on a line: centred text and headings split into even lines, body text avoids a last-word widow. */
h1, h2, h3, .hero .lead, .hero .fine, .page-head p, .section-head p, .legal, .status { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }

/* ---------- Service records ---------- */
.col.mid { max-width: 900px; }
.section-sm { margin-top: 40px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.link-card { display: block; color: var(--text); }
.link-card:hover { color: var(--text); }
.link-card .more { display: inline-block; margin-top: 12px; font-size: 14px; color: var(--label); }
.link-card:hover .more { color: var(--text); text-decoration: underline; text-underline-offset: 5px; }

/* The search box: the launcher's gamertag field (dark fill, label-blue outline, small corners cut). */
.search { position: relative; max-width: 460px; margin: 0 auto; }
.field {
    --c: 9px;
    display: flex;
    background: var(--label);
    padding: 1px;
    clip-path: polygon(0 0, calc(100% - var(--c)) 0, 100% var(--c), 100% 100%, var(--c) 100%, 0 calc(100% - var(--c)));
}
.field input {
    flex: 1;
    min-width: 0;
    background: var(--field);
    border: 0;
    color: var(--text);
    font: 400 16px/1 var(--font);
    padding: 12px 14px;
    outline: none;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 8.6px 100%, 0 calc(100% - 8.6px));
}
.field input::placeholder { color: var(--muted); }
.field button {
    background: var(--field);
    color: var(--label);
    border: 0;
    border-left: 1px solid var(--outline);
    font: 400 15px/1 var(--font);
    padding: 0 18px;
    cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 8.6px) 0, 100% 8.6px, 100% 100%, 0 100%);
}
.field button:hover { color: var(--text); background: #0a1820; }
.field:focus-within { background: var(--text); }
.suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 5;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    background: var(--field);
    border: 1px solid var(--outline);
}
.suggest a { display: block; padding: 8px 14px; color: var(--text); font-size: 15px; }
.suggest a:hover, .suggest a:focus { background: rgba(156, 194, 224, 0.1); text-decoration: none; outline: none; }

.avatar {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--avatar);
    color: #040b10;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}
.avatar.big { width: 72px; height: 72px; font-size: 34px; }

.lb-note { text-align: center; font-size: 13px; color: var(--muted); margin: 22px 0 0; }

/* One player's record */
.sr-head { text-align: center; padding: 10px 0 34px; }
.sr-head h1 { font-size: 36px; margin: 14px 0 6px; }
.sr-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--label); margin: 0; }
.sr-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--outline); }
.sr-status.on .dot { background: var(--done); box-shadow: 0 0 8px var(--done); }
.sr-rank { font-size: 22px; color: var(--amber); margin: 18px 0 0; }
.progress { max-width: 360px; margin: 14px auto 0; }
.progress .bar { height: 4px; background: #13242e; }
.progress .bar span { display: block; height: 100%; background: var(--done); }
.progress p, .needs { font-size: 13px; color: var(--label); margin: 8px 0 0; }
.tile { text-align: center; }
.tile b { display: block; font-size: 34px; font-weight: 300; color: var(--text); line-height: 1.1; }
.tile span { font-size: 14px; color: var(--label); }
.tiles + .grid { margin-top: 22px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 4px 0 0; font-size: 15px; }
.kv dt { color: var(--label); }
.kv dd { margin: 0; text-align: right; }
.sr-foot { text-align: center; font-size: 13px; color: var(--muted); margin: 26px 0 0; }
.empty { text-align: center; max-width: 560px; margin: 10px auto 0; }
.empty h2 { font-size: 22px; }
.empty p { color: var(--label); }

@media (max-width: 760px) {
    .avatar.big { width: 60px; height: 60px; font-size: 28px; }
}

/* Rank badges, with the rank's name as a tooltip */
.badge { position: relative; display: inline-block; width: 48px; line-height: 0; flex-shrink: 0; }
.badge img { display: block; width: 100%; height: auto; }
.badge::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translate(-50%, 4px);
    background: var(--field);
    border: 1px solid var(--outline);
    color: var(--text);
    font-size: 13px;
    line-height: 1.3;
    padding: 6px 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s, transform 0.12s;
    z-index: 10;
}
.badge:hover::after, .badge:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
.badge:focus-visible { outline: 1px solid var(--label); outline-offset: 3px; }
.badge.big { width: 80px; }

/* Player grid */
.sorter { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 24px; font-size: 14px; color: var(--muted); margin: 0 0 26px; }
.sorter button { background: none; border: 0; border-bottom: 1px solid transparent; color: var(--label); font: inherit; padding: 4px 0; cursor: pointer; }
.sorter button:hover { color: var(--text); }
.sorter button[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--label); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.pcard { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 24px 18px 18px; color: var(--text); }
.pcard:hover { color: var(--text); }
.pc-pos { position: absolute; top: 12px; left: 16px; font-size: 15px; color: var(--title); }
.pc-pos.podium { color: var(--amber); }
.pc-online { position: absolute; top: 30px; right: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--done); box-shadow: 0 0 8px var(--done); }
.pc-badge .badge { width: 60px; }
.pcard h3 { font-size: 19px; color: var(--text); margin: 14px 0 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-nums { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; padding: 10px 0; margin-bottom: 14px; border-top: 1px solid #1d2d36; border-bottom: 1px solid #1d2d36; }
.pc-nums b { display: block; font-size: 22px; font-weight: 300; line-height: 1.2; color: var(--text); }
.pc-nums span { font-size: 12px; color: var(--label); }
.pcard .pc-last { font-size: 12px; color: var(--muted); margin: 14px 0 0; }

/* Ranked / social / custom split */
.split { width: 100%; }
.split-bar { display: flex; gap: 2px; height: 6px; background: #13242e; }
.split-key { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 12px; color: var(--label); margin-top: 8px; }
.split-key i { display: inline-block; width: 8px; height: 8px; margin-right: 5px; vertical-align: 0; }
.s-ranked { background: var(--amber); }
.s-social { background: var(--done); }
.s-custom { background: var(--label); }

/* One player: the armour bay on the left, the record on the right */
.sr-top { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 44px; align-items: start; padding-top: 8px; }
.armour { --c: 30px; height: 380px; display: grid; place-items: center; overflow: hidden; }
.armour-glow { position: absolute; inset: 0; z-index: -2; background: radial-gradient(ellipse at 50% 75%, rgba(43, 180, 224, 0.16), transparent 65%); }
.armour-letter { font-size: 170px; font-weight: 300; line-height: 1; color: rgba(156, 194, 224, 0.12); }
.armour-note { position: absolute; left: 0; right: 0; bottom: 20px; margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.sr-id { display: flex; align-items: center; gap: 22px; }
.sr-id h1 { font-size: 38px; margin: 0 0 4px; overflow-wrap: anywhere; }
.sr-main .sr-rank { margin: 18px 0 0; font-size: 20px; }
.sr-main .progress { margin: 12px 0 0; max-width: 420px; }
.sr-main .needs { margin-top: 8px; }
.sr-games { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 30px; align-items: center; margin-top: 28px; padding: 22px 0; border-top: 1px solid #1d2d36; border-bottom: 1px solid #1d2d36; }
.sr-total b { display: block; font-size: 52px; font-weight: 300; line-height: 1; }
.sr-total span { font-size: 14px; color: var(--label); }
.sr-games .split-bar { height: 8px; }
.sr-games .split-key { font-size: 13px; justify-content: flex-start; gap: 6px 24px; }
.sr-nums { display: flex; flex-wrap: wrap; gap: 14px 44px; margin-top: 22px; }
.sr-nums b { display: block; font-size: 28px; font-weight: 300; line-height: 1.2; color: var(--text); }
.sr-nums span { font-size: 13px; color: var(--label); }

@media (max-width: 860px) {
    .sr-top { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .armour { height: 220px; }
    .armour-letter { font-size: 110px; }
}
@media (max-width: 520px) {
    .sr-games { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .sr-id h1 { font-size: 30px; }
    .badge.big { width: 64px; }
}

/* Achievements on a service record: earned ones lit, locked ones dimmed; details on hover or focus */
.achievements { margin-top: 56px; }
.ach-head, .sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; }
.ach-head h2, .sec-head h2 { margin: 0; }
.ach-head p, .sec-head p { margin: 0; font-size: 14px; color: var(--label); }
.ach-head b, .sec-head b { color: var(--text); font-weight: 400; font-size: 18px; }
.ach-head .sep, .sec-head .sep { margin: 0 8px; color: var(--outline); }
.sec-head { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid #1d2d36; }
.ach-bar { height: 4px; background: #13242e; margin: 12px 0 18px; }
.ach-bar span { display: block; height: 100%; background: var(--amber); }
.ach-none { font-size: 14px; color: var(--label); margin: 0 0 16px; }
.ach-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 10px; }
.ach { position: relative; aspect-ratio: 1; border: 1px solid #1d3340; background: #03090d; outline: none; }
.ach img { display: block; width: 100%; height: 100%; filter: grayscale(1) brightness(0.45); opacity: 0.55; transition: filter 0.15s, opacity 0.15s; }
.ach.got { border-color: var(--outline); }
.ach.got img { filter: none; opacity: 1; }
.ach:hover img, .ach:focus-visible img { opacity: 1; filter: grayscale(0.6) brightness(0.8); }
.ach.got:hover img, .ach.got:focus-visible img { filter: brightness(1.12); }
.ach:hover, .ach:focus-visible { border-color: var(--line); }
.ach-q { display: grid; place-items: center; width: 100%; height: 100%; color: var(--outline); font-size: 22px; }
.ach-tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    width: 240px;
    transform: translate(-50%, 4px);
    background: var(--field);
    border: 1px solid var(--outline);
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--label);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s, transform 0.12s;
    z-index: 10;
    text-wrap: pretty;
}
.ach-tip b { display: block; color: var(--text); font-weight: 400; font-size: 14px; padding-right: 44px; }
.ach-tip em { position: absolute; top: 10px; right: 12px; font-style: normal; color: var(--amber); }
.ach-tip span { display: block; margin-top: 4px; }
.ach-tip small { display: block; margin-top: 6px; color: var(--done); font-size: 12px; }
.ach:not(.got) .ach-tip small { color: var(--outline); }
.tipped:hover .ach-tip, .tipped:focus-visible .ach-tip { opacity: 1; transform: translate(-50%, 0); }
.tipped.tip-left .ach-tip { left: 0; transform: translate(0, 4px); }
.tipped.tip-right .ach-tip { left: auto; right: 0; transform: translate(0, 4px); }
.tipped.tip-left:hover .ach-tip, .tipped.tip-left:focus-visible .ach-tip,
.tipped.tip-right:hover .ach-tip, .tipped.tip-right:focus-visible .ach-tip { transform: none; }

/* Career: combat numbers, medals, weapons and recent games (from each game's carnage report) */
.kv .pct { color: var(--muted); font-size: 13px; margin-left: 6px; }
.combat { margin-top: 48px; }
.combat-nums { margin-top: 0; gap: 14px 40px; }
.combat-note { font-size: 13px; color: var(--muted); margin: 16px 0 0; }

.medals { margin-top: 56px; }
.medal-group { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--title); margin: 24px 0 12px; }
.medal-group:first-of-type { margin-top: 6px; }
.medal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 10px; }
.medal { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; outline: none; cursor: default; }
.medal-pic { position: relative; display: block; width: 64px; height: 64px; }
.medal-pic img { display: block; width: 100%; height: 100%; filter: grayscale(1) brightness(0.45); opacity: 0.5; transition: filter 0.15s, opacity 0.15s, transform 0.15s; }
.medal.got .medal-pic img { filter: none; opacity: 1; }
.medal:hover .medal-pic img, .medal:focus-visible .medal-pic img { opacity: 1; filter: grayscale(0.6) brightness(0.8); }
.medal.got:hover .medal-pic img, .medal.got:focus-visible .medal-pic img { filter: brightness(1.12); transform: scale(1.06); }
/* the count, on a dark tag at the medal's lower right */
.medal-pic b { position: absolute; right: -6px; bottom: -2px; min-width: 22px; padding: 1px 5px; background: var(--field); border: 1px solid var(--outline); color: var(--text); font-size: 12px; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; }
.medal-name { font-size: 12px; line-height: 1.3; color: var(--muted); }
.medal.got .medal-name { color: var(--text); }
.medal:focus-visible .medal-name { text-decoration: underline; text-underline-offset: 3px; }
.medal .ach-tip em { color: var(--text); }

.grid.two-wide { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 0 48px; align-items: start; }
.grid.two-wide > :only-child { grid-column: 1 / -1; }
.weapons, .recent { margin-top: 56px; }

/* kills by weapon: one series, bars from zero with a rounded end, the numbers in text beside them */
.wlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wlist li { display: grid; grid-template-columns: 124px minmax(0, 1fr) 84px; align-items: center; gap: 14px; font-size: 14px; }
.w-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-bar { height: 8px; border-left: 1px solid var(--outline); }
.w-bar span { display: block; height: 100%; background: var(--done); border-radius: 0 4px 4px 0; }
.wlist li:hover .w-bar span { background: var(--label); }
.w-num { text-align: right; line-height: 1.2; }
.w-num b { font-weight: 400; font-size: 16px; font-variant-numeric: tabular-nums; }
.w-num small { display: block; font-size: 11px; color: var(--muted); }

.table-wrap { overflow-x: auto; }
.games { width: 100%; border-collapse: collapse; font-size: 14px; }
.games th { text-align: left; font-weight: 400; font-size: 12px; color: var(--muted); padding: 0 10px 8px; border-bottom: 1px solid #1d2d36; }
.games td { padding: 10px; border-bottom: 1px solid #13242e; vertical-align: middle; }
.games th:first-child, .games td:first-child { padding-left: 0; }
.games th:last-child, .games td:last-child { padding-right: 0; }
.games .n { text-align: right; font-variant-numeric: tabular-nums; }
.games .when { text-align: right; white-space: nowrap; color: var(--muted); font-size: 13px; }
.games tbody tr:hover td { background: rgba(156, 194, 224, 0.04); }
.res { color: var(--muted); }
.res.win { color: var(--amber); }
.g-map { display: block; }
.g-list { display: block; font-size: 12px; color: var(--label); }

@media (max-width: 1000px) {
    .grid.two-wide { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
    .games .opt { display: none; }
    .wlist li { grid-template-columns: 122px minmax(0, 1fr) 66px; gap: 10px; }
    .medal-grid { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 14px 8px; }
    .medal-pic { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) { .medal-pic img { transition: none; } }
