/* featureos:gamification-badges@1.0.2 — Goals and badges. Tokens come from styles.css (light and dark follow the theme); the badge itself, level colours and brand marks are fixed by design. */
.bdg{display:inline-block;line-height:0;vertical-align:middle}.bdg svg{display:block}
.bd{--bd-lv:var(--brand)}
.bd-tabs{display:flex;gap:2px;overflow-x:auto;border-bottom:1px solid var(--line);margin-bottom:18px}
.bd-tabs button{border:0;background:none;padding:10px 14px;font:inherit;font-weight:600;color:var(--mut);border-bottom:3px solid transparent;cursor:pointer;min-height:44px;white-space:nowrap}
.bd-tabs button:hover{color:var(--ink)}.bd-tabs button.on{color:var(--side-active-ink);border-bottom-color:var(--brand)}
.bd-count{display:inline-block;min-width:20px;padding:0 7px;border-radius:999px;background:var(--neutral-soft);font-size:11.5px;font-weight:700;color:var(--ink-2);text-align:center}
.bd-new{font-size:11px;font-weight:800;padding:1px 7px;border-radius:999px;background:var(--brand-soft);color:var(--side-active-ink);vertical-align:middle}
.bd-body{display:grid;gap:18px;padding-bottom:40px}.bd-body>*{min-width:0}
.bd-eyebrow{font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--brand)}
.bd-h2{font-size:18px;margin:6px 0 0}
.bd-hero{display:grid;grid-template-columns:auto 1fr;gap:26px;align-items:center;padding:26px 30px;border-radius:20px;border:1px solid var(--brand-line);background:linear-gradient(135deg,var(--brand-soft),var(--surface))}
.bd-hero h2{font-size:26px;margin:4px 0}.bd-bignum{font-size:15px;color:var(--ink-2);margin-top:8px}.bd-bignum b{font-size:40px;line-height:1;color:var(--ink);font-variant-numeric:tabular-nums}
.bd-hero .bd-bar{height:12px;margin:10px 0}.bd-more{margin:2px 0 12px}
.bd-bar{display:block;height:8px;border-radius:999px;background:var(--neutral-soft);overflow:hidden}.bd-bar i{display:block;height:100%;border-radius:999px;background:var(--brand);animation:bdFill .6s ease-out}
@keyframes bdFill{from{width:0!important}}
.bd-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(380px,1fr));gap:16px}
.bd-card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:18px;display:grid;gap:12px;align-content:start;transition:transform .15s ease-out,box-shadow .15s ease-out}.bd-card:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(15,23,42,.08)}
.bd-card header{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.bd-card h3{margin:0;font-size:16px;overflow-wrap:anywhere}.bd-card p{margin:2px 0 0;overflow-wrap:anywhere}
.bd-chip{display:inline-flex;align-items:center;max-width:100%;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700;background:var(--neutral-soft);color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bd-chip.ok{background:var(--ok-soft);color:var(--ok)}.bd-chip.warn{background:var(--warn-soft);color:var(--warn)}
.bd-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.bd-step{display:grid;justify-items:center;gap:2px;padding:10px 4px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);font:inherit;color:inherit;cursor:pointer;text-align:center;min-width:0}
.bd-step.earned{border-color:var(--ok);background:var(--ok-soft)}.bd-step.current{border:2px solid var(--brand);background:var(--brand-soft)}.bd-step.locked{opacity:.55;filter:grayscale(.9)}
.bd-step:hover{transform:translateY(-2px)}.bd-step-name{font-weight:700;font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.bd-step-sub{font-size:11px;color:var(--mut);line-height:1.2}
.bd-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}
.bd-bcard{display:grid;justify-items:center;gap:6px;padding:16px 12px;border:1px solid var(--line);border-radius:16px;background:var(--surface);font:inherit;color:inherit;text-align:center;cursor:pointer;transition:transform .15s ease-out,box-shadow .15s ease-out;min-width:0}
.bd-bcard:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(15,23,42,.08)}.bd-bcard.grey{cursor:default;background:var(--surface-2)}.bd-bcard.grey:hover{transform:none;box-shadow:none}.bd-grey{filter:grayscale(1);opacity:.55}.bd-bcard .bd-bar{width:100%}
.bd-clip2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;max-width:100%}
.bd-empty{text-align:center;padding:40px 16px;color:var(--mut)}.bd-empty h2{color:var(--ink);margin:8px 0 4px}.bd-ghost{color:var(--mut);display:inline-block}
.bd-grid2{display:grid;font-size:14px}.bd-r{display:grid;grid-template-columns:1fr 110px 110px;gap:10px;align-items:center;padding:10px 4px;border-bottom:1px solid var(--line)}.bd-r.h{font-weight:700;color:var(--ink-2)}
.bd-sw{display:inline-flex;align-items:center;gap:10px;cursor:pointer}.bd-sw input{position:absolute;opacity:0;width:1px;height:1px}.bd-sw i{width:38px;height:22px;border-radius:999px;background:var(--line-strong);position:relative;transition:background .15s;flex:none}
.bd-sw i::after{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform .15s}.bd-sw input:checked+i{background:var(--brand)}.bd-sw input:checked+i::after{transform:translateX(16px)}
.bd-sw input:focus-visible+i{outline:3px solid var(--focus);outline-offset:2px}.bd-sw.wide{display:flex;margin:12px 0}.bd-sw small{display:block}.bd-fine{font-size:12.5px;margin-top:10px}
/* detail + sharing */
.bd-detail{display:grid;grid-template-columns:260px 1fr;gap:22px}.bd-dleft{display:grid;justify-items:center;align-content:start;text-align:center;gap:8px;padding:22px 14px;border-radius:16px;background:linear-gradient(160deg,color-mix(in srgb,var(--lv) 22%,var(--surface)),var(--surface))}
.bd-dleft h3{margin:6px 0 0;overflow-wrap:anywhere}.bd-dright{position:relative;display:grid;gap:12px;align-content:start;min-width:0}.bd-dright h3{margin:0}.bd-dright p{margin:0}
.bd-two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.btn.li{background:#0a66c2;border-color:#0a66c2;color:#fff;text-align:center;justify-content:center;text-decoration:none}
.bd-nets{display:grid;grid-template-columns:repeat(auto-fill,minmax(78px,1fr));gap:10px}.bd-net{display:grid;justify-items:center;gap:4px;font-size:12px;color:var(--ink-2);text-decoration:none;padding:6px 2px;border-radius:10px}.bd-net:hover{background:var(--neutral-soft)}
.bd-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;color:#fff;font-weight:800;font-size:17px}
.bd-lab{font-weight:700;font-size:13px}#bd-post{width:100%;resize:vertical;font:inherit;padding:10px;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--ink)}
.bd-ids{display:grid;grid-template-columns:max-content 1fr;gap:6px 14px;margin:0;font-size:13px}.bd-ids dt{color:var(--mut)}.bd-ids dd{margin:0;overflow-wrap:anywhere}.mono{font-family:ui-monospace,Consolas,monospace}
.bd-shareimg{width:100%;height:auto;border-radius:12px;border:1px solid var(--line);margin:8px 0 14px}
.bd-pop{position:absolute;z-index:5;width:230px;background:var(--surface);border:1px solid var(--line-strong);border-radius:12px;box-shadow:0 12px 32px rgba(15,23,42,.18);padding:10px;display:grid;gap:2px}
.bd-pop a,.bd-pop button{display:block;text-align:left;padding:8px 10px;border:0;background:none;border-radius:8px;color:var(--ink);font:inherit;text-decoration:none;cursor:pointer}.bd-pop a:hover,.bd-pop button:hover{background:var(--neutral-soft)}.bd-pop p{padding:0 10px 6px}
/* popups */
.bd-pop-new{position:relative;text-align:center;display:grid;justify-items:center;gap:8px;padding:6px 10px 4px;overflow:hidden}.bd-pop-new h2{margin:0;font-size:26px;overflow-wrap:anywhere}.bd-pop-new .row.center{justify-content:center;margin-top:10px}
.bd-popbadge{animation:bdPop .6s cubic-bezier(.2,1.5,.4,1)}@keyframes bdPop{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}
.bd-conf{position:absolute;inset:0;pointer-events:none;overflow:hidden}.bd-conf i{position:absolute;top:-10px;width:8px;height:14px;border-radius:2px;animation:bdFall 1.8s ease-in forwards}@keyframes bdFall{to{transform:translateY(420px) rotate(540deg);opacity:0}}
.bd-also{background:var(--neutral-soft);padding:8px 12px;border-radius:10px;font-size:13px;margin:0}
.bd-sum{display:grid;gap:14px}.bd-sumhead{display:flex;justify-content:space-between;gap:14px;align-items:center}.bd-sumhead p{margin:4px 0 0}.bd-float{animation:bdFloat 3s ease-in-out infinite;filter:drop-shadow(0 8px 14px rgba(0,0,0,.18))}@keyframes bdFloat{50%{transform:translateY(-6px)}}
.bd-three{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.bd-three div{background:var(--neutral-soft);border-radius:12px;padding:10px;text-align:center}.bd-three b{display:block;font-size:24px}.bd-three span{font-size:12px;color:var(--mut)}
.bd-sumcards{display:grid;gap:10px;max-height:46vh;overflow:auto}.bd-scard{display:grid;grid-template-columns:auto 1fr;gap:12px;padding:12px;border:1px solid var(--line);border-radius:14px;animation:bdRise .45s ease-out both}@keyframes bdRise{from{transform:translateY(14px);opacity:0}}
.bd-srow{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.bd-sbody p{margin:2px 0}.bd-snum{font-size:13px}.bd-lvls{display:flex;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--mut)}.bd-lvls .earned{color:var(--ok);font-weight:700}.bd-lvls .current{color:var(--brand);font-weight:700}
@media(max-width:900px){.bd-hero{grid-template-columns:1fr;justify-items:center;text-align:center}.bd-cards{grid-template-columns:1fr}.bd-detail{grid-template-columns:1fr}.bd-steps{grid-template-columns:repeat(2,1fr)}}
@media(max-width:480px){.bd-hero{padding:20px 16px}.bd-two{grid-template-columns:1fr}.bd-r{grid-template-columns:1fr 70px 70px}.bd-three{gap:6px}.bd-sumhead .bd-float{display:none}}
@media(prefers-reduced-motion:reduce){.bd *,.bd-pop-new *,.bd-sum *{animation:none!important;transition:none!important}}
.nav-new{margin-left:auto;font-size:10px;font-weight:800;padding:1px 6px;border-radius:999px;background:var(--brand-soft);color:var(--side-active-ink)}
dialog.xwide{width:min(80rem,96vw);max-width:96vw}.dlg-head{gap:12px}.dlg-slot{margin-left:auto}
