/* MalGuard Usage · minimal red progress rings, scoped to the account UI. */
#usage-entry{font-weight:650;white-space:nowrap}
#usage-entry[hidden],.mg-quota-lock[hidden],#composer[data-quota-locked]{display:none!important}
.mg-usage-dialog,.mg-quota-lock{
 --usage-bg:var(--site-canvas);--usage-card:var(--site-surface);--usage-ink:var(--site-text);--usage-muted:var(--site-muted);--usage-line:var(--site-border);--usage-track:var(--site-selection);--usage-pill:var(--site-panel);--usage-red:#df172b;--usage-danger:#a71c30;
 color-scheme:light;font-family:inherit;color:var(--usage-ink);background:var(--usage-bg);
}
html:not([data-theme=light]):not(.theme-light) :is(.mg-usage-dialog,.mg-quota-lock){
 --usage-red:#ff3b4e;--usage-danger:#ff9da7;color-scheme:dark;
}
html:root body .mg-usage-dialog.mg-usage-dialog{
 width:min(820px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:88dvh;overflow:auto;box-sizing:border-box;padding:clamp(16px,3vw,32px);background:var(--usage-bg)!important;color:var(--usage-ink)!important;border:1px solid var(--usage-line)!important;border-radius:26px!important;box-shadow:var(--site-shadow)!important;
}
html:root body .mg-usage-dialog.mg-usage-dialog::backdrop{background:#0008;backdrop-filter:blur(8px)}
html:root body :is(.mg-usage-dialog,.mg-quota-lock) :is(h2,h3,p,strong,span,small,b){color:var(--usage-ink)!important}
.mg-usage-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:26px}
html:root body .mg-usage-dialog.mg-usage-dialog h2{font-size:clamp(28px,5vw,36px)!important;font-weight:650!important;letter-spacing:-.045em;line-height:1.15;margin:14px 0 7px!important}
.mg-usage-head small{font-weight:650;font-size:12px;letter-spacing:.025em}
html:root body :is(.mg-usage-dialog,.mg-quota-lock) :is(.mg-usage-head p,.mg-ring-center small,.mg-reset-pill,.mg-model-detail span,.mg-model-detail small,.mg-model-empty,.mg-shared-note p){color:var(--usage-muted)!important}
html:root body .mg-usage-dialog .mg-usage-head p{font-size:13px;line-height:1.55;margin:0}
html:root body .mg-usage-dialog.mg-usage-dialog .mg-usage-head button{width:38px;height:38px;min-height:38px;flex:none;padding:0;line-height:1;font-size:24px;border-radius:50%!important;background:var(--usage-pill)!important;border:0!important;color:var(--usage-ink)!important}
.mg-usage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;margin:8px 0 28px}
.mg-usage-tile{min-width:0;text-align:center;padding:0 12px 4px;box-sizing:border-box}
.mg-usage-tile+.mg-usage-tile{border-inline-start:1px solid var(--usage-line)}
.mg-usage-ring{position:relative;width:min(144px,100%);aspect-ratio:1;margin:0 auto 12px;display:grid;place-items:center}
.mg-usage-ring svg{display:block;width:100%;height:100%;transform:rotate(-90deg);overflow:visible}
.mg-ring-track,.mg-ring-value{fill:none;stroke-width:8;stroke-linecap:round}
.mg-ring-track{stroke:var(--usage-track)}
.mg-ring-value{stroke:var(--usage-red)}
.mg-ring-center{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;pointer-events:none}
.mg-ring-center strong{font-size:clamp(21px,4vw,36px);font-weight:650;font-variant-numeric:tabular-nums;letter-spacing:-.045em;line-height:1.05;direction:ltr}
.mg-ring-center small{font-size:11px;line-height:1.2}
.mg-usage-tile h3{margin:0 0 8px;font-size:16px;font-weight:650;line-height:1.35}
html:root body :is(.mg-usage-dialog,.mg-quota-lock) .mg-usage-count{font-size:12px;font-variant-numeric:tabular-nums;line-height:1.55;overflow-wrap:anywhere;margin:0 0 9px}
.mg-usage-count strong{font-weight:650}
.mg-reset-pill{display:inline-block;font-size:10px;line-height:1.45;border-radius:10px;padding:7px 8px;background:var(--usage-pill);max-width:100%;overflow-wrap:anywhere}
.mg-reset-countdown{display:block;font-variant-numeric:tabular-nums;direction:ltr;font-size:12px;margin-top:8px}
html:root body :is(.mg-usage-dialog,.mg-quota-lock) :is(.is-limited .mg-ring-center strong,.is-limited .mg-reset-countdown,.mg-limit-line,.mg-limit-line .mg-reset-countdown){color:var(--usage-danger)!important}
.mg-model-section{border:1px solid var(--usage-line);border-radius:18px;padding:18px;background:var(--usage-card)}
.mg-model-title{font-size:17px;font-weight:650;letter-spacing:-.015em;margin:0 0 13px}
.mg-usage-models{display:grid;gap:0}
.mg-usage-model{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);align-items:center;gap:16px;padding:14px 0;overflow-wrap:anywhere}
.mg-usage-model+.mg-usage-model{border-top:1px solid var(--usage-line)}
.mg-usage-model:last-child{padding-bottom:2px}
.mg-model-detail,.mg-model-stats{display:grid;gap:5px;min-width:0}
.mg-model-detail strong{font-size:13px;font-weight:650}
.mg-model-detail span,.mg-model-detail small{font-size:11px;line-height:1.45}
.mg-model-stats strong{font-size:12px;font-weight:600;font-variant-numeric:tabular-nums}
.mg-model-stats progress{width:100%;height:8px;border:0;border-radius:999px;appearance:none;-webkit-appearance:none;background:var(--usage-track);accent-color:var(--usage-red);overflow:hidden}
.mg-model-stats progress::-webkit-progress-bar{background:var(--usage-track);border-radius:999px}
.mg-model-stats progress::-webkit-progress-value{background:var(--usage-red);border-radius:999px}
.mg-model-stats progress::-moz-progress-bar{background:var(--usage-red);border-radius:999px}
.mg-model-empty{font-size:12px;margin:0}
.mg-shared-note{display:flex;gap:10px;align-items:flex-start;margin:20px 2px 0;font-size:12px;line-height:1.6}
.mg-shared-note strong{font-weight:650}
html:root body .mg-usage-dialog .mg-shared-note p{font-size:11px;line-height:1.65;margin:4px 0 0}
.mg-info-icon{width:18px;height:18px;border:1px solid var(--usage-muted);border-radius:50%;text-align:center;line-height:16px;flex:none;font-size:11px;margin-top:1px}
.mg-quota-lock{max-width:760px;margin:10px auto;width:100%;padding:20px;border:1px solid var(--usage-line);border-radius:20px;box-sizing:border-box}
.mg-quota-lock h3{margin:0 0 5px;font-size:18px;font-weight:650}
.mg-quota-lock>p{font-size:12px;line-height:1.6}
.mg-quota-lock .mg-usage-grid{margin:18px 0}
.mg-quota-lock .mg-usage-ring{max-width:88px;margin-bottom:8px}
.mg-quota-lock .mg-ring-center strong{font-size:clamp(17px,3vw,25px)}
.mg-quota-lock .mg-ring-center small{font-size:9px}
.mg-quota-lock .mg-usage-tile h3{font-size:12px}
.mg-limit-line{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;border-top:1px solid var(--usage-line);padding-top:9px}
.mg-lock-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.mg-lock-actions button{border:1px solid var(--usage-line);border-radius:10px;background:var(--usage-card);color:var(--usage-ink);padding:9px 12px}
html:root body :is(.mg-usage-dialog,.mg-quota-lock) button:focus-visible{outline:2px solid var(--usage-red);outline-offset:3px}
@media(max-width:500px){
 html:root body .mg-usage-dialog.mg-usage-dialog{padding:16px 12px}
 .mg-usage-head{margin-bottom:20px}.mg-usage-grid{margin-bottom:20px}.mg-usage-tile{padding:0 5px 3px}.mg-usage-ring{margin-bottom:10px}
 .mg-ring-center strong{font-size:clamp(17px,5vw,26px)}.mg-ring-center small{font-size:9px}.mg-usage-tile h3{font-size:12px}
 html:root body :is(.mg-usage-dialog,.mg-quota-lock) .mg-usage-count{font-size:10px}.mg-reset-pill{font-size:9px;padding:5px 4px}
 .mg-model-section{padding:13px}.mg-usage-model{grid-template-columns:minmax(0,1fr);gap:10px}.mg-quota-lock{padding:12px}
}

/* Brand marks use a local, reviewed SVG sprite; no external image requests. */
.mg-model-identity{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}
.mg-model-mark{width:26px;height:26px;display:inline-grid;place-items:center;flex:none;border-radius:7px;background:var(--usage-pill);color:var(--usage-ink)}
.mg-model-mark svg{display:block;width:18px;height:18px;color:inherit}
.mg-model-identity .mg-model-name{font-size:14px;line-height:1.35;font-weight:650;letter-spacing:-.015em}
.mg-model-identity .mg-model-variant{font-size:10px;font-weight:500;line-height:1.25}
.mg-model-fallback{font-size:16px;line-height:1}
@media(max-width:500px){.mg-model-identity{gap:7px}.mg-model-mark{width:24px;height:24px}.mg-model-mark svg{width:16px;height:16px}}
