/* achievements: rarity (owner 04.12 20:44, 21:09). Linked from temp/wiki.php, case 'achievements'.
   Each card ends in a footer: the tier word, the share of Steam players and a small rarity gauge. The gauge is not a
   progress bar: four equal zones, common on the left to very rare on the right, brighter the rarer; the card's zone
   is lit and a pointer above marks the share inside it. Tiers by share: 4 very rare < 5%, 3 rare < 10%, 2 uncommon < 35%,
   1 common, 0 planned (not on Steam). The one loud thing is the very rare badge; the rest stays quiet. */
.kb-ach{grid-template-rows:1fr auto;row-gap:10px}
.kb-achb>:last-child{margin-bottom:0}
.kb-rar-0{--tc:var(--muted)}
.kb-rar-1{--tc:var(--muted);--gc:#c4b49b}
.kb-rar-2{--tc:var(--brass-2);--gc:var(--brass-2)}
.kb-rar-3{--tc:var(--brass);--gc:var(--brass)}
.kb-rar-4{--tc:#2c1a10;--gc:#ffe6bf}

/* the footer: one line when the card is wide; tier and gauge over the share when it is narrow */
.kb-rar{grid-column:1/-1;min-width:0;container-type:inline-size}
.kb-rar p{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin:0;font-size:12.5px;line-height:1.35;color:var(--muted)}
.kb-rar-0 p{font-size:13px}
.kb-share b{font-weight:700;font-size:16px;color:#fff6e6;white-space:nowrap}
.kb-rar .kb-share{margin-left:auto;text-align:right}   /* the share of Steam players on the right (owner 04.12 22:27) */

/* the tier: plain for common, an outline for uncommon and rare, solid brass for very rare */
.kb-tier{white-space:nowrap}
.kb-rar .kb-tier{padding:2px 9px;border:1px solid transparent;border-radius:999px;font-weight:600;font-size:12px;line-height:1.3;color:var(--tc)}
.kb-rar.kb-rar-1 .kb-tier{padding-left:0}
.kb-rar.kb-rar-2 .kb-tier{border-color:rgba(219,185,137,.38)}
.kb-rar.kb-rar-3 .kb-tier{border-color:rgba(255,216,160,.7);background:rgba(255,216,160,.07)}
.kb-rar.kb-rar-4 .kb-tier{border-color:#ffe6bf;background:linear-gradient(180deg,#ffe6bf,#e6bd84);box-shadow:0 0 16px rgba(255,216,160,.3)}

/* the gauge: zones dim to bright left to right, the card's zone lit, the pointer at the share (--x from wiki.php) */
.kb-gauge{position:relative;display:grid;grid-template-columns:repeat(4,1fr);gap:2px;flex:0 0 112px;width:112px;height:6px;margin-top:5px}
.kb-gauge i{border-radius:1px;background:rgba(255,216,160,.1)}
.kb-gauge i:nth-child(2){background:rgba(255,216,160,.15)}
.kb-gauge i:nth-child(3){background:rgba(255,216,160,.21)}
.kb-gauge i:nth-child(4){background:rgba(255,216,160,.28)}
.kb-rar-1 .kb-gauge i:nth-child(1),.kb-rar-2 .kb-gauge i:nth-child(2),.kb-rar-3 .kb-gauge i:nth-child(3),.kb-rar-4 .kb-gauge i:nth-child(4){background:var(--gc)}
.kb-rar-4 .kb-gauge i:nth-child(4){box-shadow:0 0 8px rgba(255,216,160,.45)}
.kb-rar .kb-gauge::after{content:'';position:absolute;left:var(--x);top:-7px;border:4px solid transparent;border-top:5px solid #fff6e6;border-bottom:0;transform:translateX(-50%)}

/* «Rarest first»: a heading at the start of each tier, with its gauge and range (hidden when sorted by topic) */
.kb-achtier{display:none;grid-column:1/-1;align-items:center;flex-wrap:wrap;gap:4px 14px;margin:22px 0 2px;padding-bottom:6px;border-bottom:1px solid var(--line)}
.kb-achs.rare .kb-achtier{display:flex}
.kb .kb-achtier small{margin:0;font-size:14px}
.kb-achtier .kb-gauge{flex-basis:84px;width:84px}
.kb-achtier.kb-rar-4{--gc:var(--brass)}

.kb-achsort button:focus-visible{outline:2px solid var(--brass);outline-offset:-2px}
@media (forced-colors:active){
  .kb-gauge,.kb-gauge::after{forced-color-adjust:none}
}
