/* Keep subscription indicators inside the control and its scrolling container. */
html .nav-item.locked-feature::after,
html .nav-btn.locked-feature::after {
  top:5px!important;right:5px!important;transform:none!important;
  max-width:calc(100% - 10px);box-sizing:border-box;white-space:nowrap;
}
html .btn.locked-feature::after,
html .module-head-actions .btn.locked-feature::after,
html .workspace-save-exercise-btn.locked-feature::after {
  top:3px!important;right:3px!important;transform:none!important;
  max-width:calc(100% - 6px);box-sizing:border-box;
}
html .icon-btn.locked-feature::after,
html .view-trigger.locked-feature::after,
html .export-trigger.locked-feature::after,
html .project-trigger.locked-feature::after {
  top:2px!important;right:2px!important;transform:none!important;
  font-size:9px;line-height:1;padding:1px;max-width:calc(100% - 4px);box-sizing:border-box;
}
html .btn.locked-feature:not(.icon-btn) {padding-inline-end:48px;}
html .workspace-save-exercise-btn.locked-feature{padding-inline-end:26px!important}
body.editor-free-plan #workspacePlanTab{position:relative;opacity:.6;padding-inline-end:26px!important}
body.editor-free-plan #workspacePlanTab::after{content:"🔒";position:absolute;top:3px;right:3px;font-size:12px;line-height:1;pointer-events:none;transform:none}
html .account-tile{min-width:0;grid-template-columns:minmax(0,1fr)}
html .account-tile>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
html .account-tile .block-title{white-space:normal}
html .account-tile .btn{min-width:0;white-space:normal;max-width:100%}
/* Keep all three header groups on one row without overflowing their grid cells. */
@media(min-width:1121px){
 html body.workspace-redesign .workspace-header{grid-template-columns:minmax(170px,1fr) max-content max-content;gap:8px}
 html .workspace-header-actions{min-width:max-content}
}
@media(min-width:1121px) and (max-width:1500px){
 html .workspace-header-brand{gap:7px}
 html .workspace-header-title{font-size:14px}
 html .workspace-header-nav{gap:2px;padding:3px}
 html .workspace-nav-btn{padding-inline:7px!important;font-size:11px!important}
 html .workspace-header-actions{gap:4px;font-size:11px}
 html .workspace-header-actions>button,
 html .workspace-header-actions .view-trigger,
 html .workspace-header-actions .project-trigger,
 html .workspace-header-actions .export-trigger,
 html .workspace-header-actions .workspace-more-trigger{min-width:32px;height:34px;padding-inline:8px;font-size:11px}
 html .workspace-header-actions>.icon-btn{width:32px;min-width:32px;padding:0}
}
.workspace-plan-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;min-width:0}
.workspace-plan-choice{min-width:0;border:1px solid var(--line,rgba(255,255,255,.12));border-radius:18px;padding:20px;background:var(--panel,#0a1627);color:var(--text,#eef3f9)}
.workspace-plan-choice h3{margin:0 0 12px;font-size:24px}
.workspace-plan-choice p{font-size:14px;line-height:1.5;white-space:normal}
.workspace-plan-choice .btn{display:block;text-align:center;margin-top:18px;white-space:normal;height:auto;min-height:42px;padding:12px}
.workspace-plan-choices .btn{background:rgba(34,197,94,.16);border:1px solid rgba(34,197,94,.3);border-radius:12px;color:inherit;text-decoration:none}
@media(max-width:600px){.workspace-plan-choices{grid-template-columns:1fr}.workspace-plan-choice{padding:16px}}

/* R83: generic paid-access indicator; paid plan names remain unchanged. */
html body .locked-feature::after,html[data-mfa-plan="free"] body .mfa-pro-locked-link::after{content:"Upgrade"!important;text-transform:none!important;font-size:8px!important;letter-spacing:0!important;padding-inline:5px!important}
html body :is(.icon-btn,.view-trigger,.export-trigger,.project-trigger).locked-feature::after{content:"\1f512"!important;font-size:10px!important;padding:0!important}

/* R85: one theme-derived Upgrade badge across navigation, editor and menus. */
@layer mfe-dark-ui {
html[data-mfe-theme] body :is(.locked-feature,.mfa-pro-locked-link),html[data-mfe-theme] body.editor-free-plan #workspacePlanTab{opacity:1!important;}
html[data-mfe-theme] body :is(.locked-feature,.mfa-pro-locked-link)::after,
html[data-mfe-theme] body.editor-free-plan #workspacePlanTab::after{content:"Upgrade"!important;position:absolute!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;top:3px!important;right:3px!important;bottom:auto!important;left:auto!important;transform:none!important;min-width:0!important;width:auto!important;max-width:calc(100% - 6px)!important;height:16px!important;box-sizing:border-box!important;padding:0 5px!important;border:1px solid var(--accent)!important;border-radius:999px!important;background:var(--accent)!important;background-image:none!important;color:var(--mfa-upgrade-ink,#000)!important;-webkit-text-fill-color:var(--mfa-upgrade-ink,#000)!important;box-shadow:none!important;font:900 8px/1 Arial,Helvetica,sans-serif!important;letter-spacing:0!important;text-transform:none!important;white-space:nowrap!important;pointer-events:none!important;z-index:6!important;}
html[data-mfe-theme] body :is(.icon-btn,.view-trigger,.export-trigger,.project-trigger).locked-feature::after{font-size:7px!important;padding-inline:2px!important;right:1px!important;max-width:calc(100% - 2px)!important;}
html[data-mfe-theme] body :is(.upgrade-btn,.upgrade-btn:hover,.upgrade-btn:focus-visible){background:var(--accent)!important;background-image:none!important;border-color:var(--accent)!important;color:var(--mfa-upgrade-ink,#000)!important;-webkit-text-fill-color:var(--mfa-upgrade-ink,#000)!important;box-shadow:none!important;filter:none!important;}
}

@layer mfe-dark-ui {
html[data-mfe-theme] body #upgradeBtn.upgrade-btn,
html[data-mfe-theme] body.workspace-redesign #topbar .workspace-header-actions #upgradeBtn.upgrade-btn{background:var(--accent)!important;background-image:none!important;border-color:var(--accent)!important;color:var(--mfa-upgrade-ink,#000)!important;-webkit-text-fill-color:var(--mfa-upgrade-ink,#000)!important;box-shadow:none!important;filter:none!important;}
}
