/* Coding workspace: one icon grid, quiet surfaces, clear reading hierarchy. */
:root{--nav-icon:var(--muted);--nav-active:var(--d-ink,#214edb);--nav-active-bg:var(--d-soft,#edf3ff)}
:root[data-theme=night]{--nav-icon:var(--muted);--nav-active:var(--n-ink,#a9c1ff);--nav-active-bg:rgba(var(--accent-bright-rgb,140,175,255),.14)}
:root .icon-outline{display:inline-block;vertical-align:middle;flex-shrink:0;overflow:visible}
:root :is(.sidebar,.mp-menu) :is(.nav-item,.mp-top-item){gap:12px!important;line-height:1.35!important}
:root :is(.sidebar .nav-item,.mp-menu .mp-top-item) svg{width:20px!important;height:20px!important;opacity:1!important;color:var(--nav-icon)}
:root :is(.sidebar .nav-item.active,.mp-top-item.on,.mp-sub-item[aria-current=page]){background:var(--nav-active-bg)!important;color:var(--nav-active)!important;box-shadow:none!important}
:root :is(.sidebar .nav-item.active,.mp-top-item.on) svg{color:var(--nav-active)}
:root .sidebar .nav-item .count{display:grid;place-items:center;min-width:21px;height:21px;padding:0 5px;font:500 11px/1 system-ui;border:1px solid var(--line);background:var(--glass);color:var(--muted);border-radius:6px;margin-left:auto}
:root .sidebar .nav-item .count:empty{display:none}
:root .sidebar .nav-group svg{width:13px;height:13px;opacity:.7}
:root .sidebar .nav-new{font-size:10px;padding:2px 6px;border:1px solid var(--line);background:transparent;color:var(--muted);border-radius:5px}
:root .sidebar .profile{border-top:1px solid var(--line);gap:10px}:root .sidebar .profile .avatar{width:32px;height:32px;font-size:11px}:root .sidebar .profile-text strong{font-size:12px}:root .sidebar .profile-text small{font-size:11px}
:root .workspace-popover .menu-icon svg{width:18px;height:18px}:root .workspace-popover .menu-check svg{width:16px;height:16px}
:root .topbar .crumb{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px!important}:root .topbar .crumb>*{max-width:100%;overflow:hidden;text-overflow:ellipsis}
:root .workspace .demo-strip{font-size:10px;letter-spacing:0;min-height:29px}
@media(min-width:901px){
 :root.menu-collapsed:not(.nav-hidden) .workspace{margin-left:110px!important}
 :root:not(.menu-collapsed) .sidebar{width:236px!important;min-width:236px!important;max-width:236px!important;padding:16px 12px!important}
 :root:not(.menu-collapsed):not(.nav-hidden) .workspace{margin-left:272px!important;margin-right:0!important}
 :root:not(.menu-collapsed) .sidebar .nav-item{min-height:41px!important;padding:9px 10px!important;margin:2px 0!important;font-size:12px!important}
 :root:not(.menu-collapsed) .sidebar .nav-group{padding:17px 10px 7px!important;font-size:10px!important}
 :root .sidebar .org-header{padding-bottom:12px!important}
}
:root #visitView{padding:18px 22px 24px!important;gap:18px;overflow:auto;min-width:0;box-sizing:border-box}
:root #visitView>.tabs{align-self:stretch;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0;background:transparent!important;padding:0 0 10px!important;gap:6px;min-height:42px;flex:none;box-shadow:none}
:root #visitView>.tabs button{border:0!important;border-radius:7px;padding:8px 14px;font-size:12px;min-height:34px;color:var(--muted);white-space:nowrap}
:root #visitView>.tabs button.active,:root #visitView>.tabs button[aria-selected=true]{background:var(--nav-active-bg)!important;color:var(--nav-active)!important;font-weight:600}
:root #encoderWorkspace{padding:0!important;min-width:0;overflow:visible;height:auto}
:root #encoderWorkspace .enc-shell{gap:18px;min-width:0;height:auto;overflow:visible}
:root #encoderWorkspace .grouping-cards{grid-template-columns:minmax(0,3fr) minmax(195px,1fr);gap:14px}
:root #encoderWorkspace .enc-head .drg-card{grid-template-columns:minmax(0,1fr);gap:18px;padding:20px!important;border:1px solid var(--line);border-radius:14px!important;background:var(--workroom-surface)!important;box-shadow:none;animation:none}
:root #encoderWorkspace .drg-code-row{margin-top:8px;gap:12px}:root #encoderWorkspace .drg-code{font:600 30px/1.2 system-ui;letter-spacing:-.04em;color:var(--ink)}
:root #encoderWorkspace .drg-title{font-size:13px;line-height:1.6;font-weight:400;max-width:62ch;color:var(--muted)}
:root #encoderWorkspace .drg-eyebrow{font-size:11px;letter-spacing:0;font-weight:500}:root #encoderWorkspace .live-dot::after{animation:none!important}
:root #encoderWorkspace .drg-metrics{grid-template-columns:1.35fr 1fr 1fr;gap:0;border-top:1px solid var(--line);padding-top:15px}
:root #encoderWorkspace .metric,:root #encoderWorkspace .metric.hero{padding:0 14px;background:transparent!important;border:0;border-right:1px solid var(--line);border-radius:0;box-shadow:none!important;transform:none!important;gap:6px}
:root #encoderWorkspace .metric:first-child{padding-left:0}:root #encoderWorkspace .metric:last-child{padding-right:0;border-right:0}
:root #encoderWorkspace .metric>span,:root #encoderWorkspace .metric small{font-size:10px;color:var(--muted)!important;font-weight:400;line-height:1.5}
:root #encoderWorkspace .metric b,:root #encoderWorkspace .metric.hero b{font:600 21px/1.25 system-ui;color:var(--ink)!important;letter-spacing:-.025em}
:root #encoderWorkspace .apr-summary{padding:20px!important;border-radius:14px!important;display:flex;flex-direction:column;justify-content:flex-start;box-shadow:none!important;gap:14px}
:root #encoderWorkspace .apr-summary h2{font-size:13px!important;font-weight:600}:root #encoderWorkspace .apr-summary dl{gap:12px}:root #encoderWorkspace .apr-summary dt{font-size:11px;color:var(--muted)}:root #encoderWorkspace .apr-summary dd{font-size:12px;font-weight:500}:root #encoderWorkspace .apr-summary>p{font-size:10px;line-height:1.6;border-top:1px solid var(--line);padding-top:12px;margin-top:auto}
:root #encoderWorkspace .enc-body{grid-template-columns:minmax(0,1fr) 214px;gap:16px;align-items:start;overflow:visible}
:root #encoderWorkspace .enc-main{border-radius:14px!important;overflow:hidden;box-shadow:none!important;min-width:0}
:root #encoderWorkspace .enc-tabs{padding:16px 18px;gap:10px;flex-wrap:wrap;background:var(--field-bg);min-height:55px}
:root #encoderWorkspace .enc-tab{border:0;padding:0;margin:0;font-size:15px;line-height:1.4;font-weight:600;letter-spacing:-.02em}
:root #encoderWorkspace .enc-tabs .small{font-size:10px;margin:0;line-height:1.5}:root #encoderWorkspace .enc-tabs .sec-all{margin:0;font-size:10px;font-weight:400;gap:12px}
:root #encoderWorkspace .enc-warn{width:18px;height:18px;font-size:11px;background:var(--amber-soft);color:var(--amber);border-radius:5px}
:root #encoderWorkspace .basket-history{padding:10px 18px;gap:6px;background:var(--glass)}:root #encoderWorkspace .basket-history .btn{min-height:29px;font-size:11px;padding:4px 10px;border-radius:6px!important}
:root #encoderWorkspace .sum-sec{margin:0!important;border:0!important;border-bottom:1px solid var(--line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;transform:none!important}
:root #encoderWorkspace .sum-sec:last-child{border-bottom:0!important}:root #encoderWorkspace .sum-head{padding:16px 18px!important;gap:12px!important;background:transparent!important}
:root #encoderWorkspace .sec-ic{width:28px;height:28px;border-radius:7px;background:var(--field-bg)!important;color:var(--nav-icon)!important;transform:none!important}:root #encoderWorkspace .sec-ic svg{width:18px!important;height:18px!important;transform:none!important}
:root #encoderWorkspace .sec-title{font-size:13px;font-weight:600}:root #encoderWorkspace .sec-count,:root #encoderWorkspace .sec-badge{font-size:10px;font-weight:500;border-radius:5px;min-width:20px}
:root #encoderWorkspace .sum-body{padding:0 18px 20px 58px!important;font-size:12px;line-height:1.65}
:root #encoderWorkspace .sum-body h4,:root #encoderWorkspace .sum-body h3{font-size:11px;text-transform:none;letter-spacing:0;font-weight:600;margin:16px 0 10px;color:var(--muted)}
:root #encoderWorkspace .msg{padding:9px 12px;margin:8px 0;border-left-width:2px;border-radius:0 6px 6px 0;background:var(--field-bg)}:root #encoderWorkspace .msg p{font-size:12px;line-height:1.65}:root #encoderWorkspace .msg small{font-size:10px;color:var(--muted)}
:root #encoderWorkspace .enc-rail{position:sticky;top:0;min-width:0}:root #encoderWorkspace .rail-card{padding:12px!important;border-radius:14px!important;box-shadow:none!important;gap:4px}
:root #encoderWorkspace .rail-label{font-size:10px;text-transform:none;letter-spacing:0;font-weight:500;color:var(--muted);padding:8px 9px 3px;margin:0}
:root #encoderWorkspace .rail-btn{min-height:36px;padding:8px 9px;border:0;border-radius:7px;background:transparent;color:var(--ink);font-size:12px;font-weight:400;gap:10px;box-shadow:none}
:root #encoderWorkspace .rail-btn svg{width:18px;height:18px;color:var(--nav-icon)}:root #encoderWorkspace .rail-btn:hover{background:var(--field-bg)}:root #encoderWorkspace .rail-btn.main,:root #encoderWorkspace .rail-btn.on{background:var(--nav-active-bg);color:var(--nav-active)}:root #encoderWorkspace .rail-btn.main svg,:root #encoderWorkspace .rail-btn.on svg{color:var(--nav-active)}
:root #encoderWorkspace .rail-btn kbd{background:var(--glass);border:1px solid var(--line);border-radius:4px;font-size:9px;box-shadow:none}
@media(max-width:1150px){:root #encoderWorkspace .grouping-cards{grid-template-columns:1fr}:root #encoderWorkspace .apr-summary{display:block}:root #encoderWorkspace .apr-summary dl{display:flex;flex-wrap:wrap;gap:12px 24px;margin-block:12px}:root #encoderWorkspace .apr-summary dl div{display:flex;gap:12px}:root #encoderWorkspace .apr-summary>p{padding-top:8px}}
@media(max-width:1000px){:root #encoderWorkspace .enc-body{grid-template-columns:1fr}:root #encoderWorkspace .enc-rail{position:static;order:-1}:root #encoderWorkspace .rail-card{display:flex;flex-direction:row;flex-wrap:wrap}:root #encoderWorkspace .rail-label{display:none}:root #encoderWorkspace .rail-btn{min-height:38px}}
@media(max-width:600px){:root #visitView{padding:12px!important;gap:12px}:root #visitView>.tabs{overflow-x:auto}:root #encoderWorkspace .enc-head .drg-card{padding:16px!important}:root #encoderWorkspace .drg-metrics{grid-template-columns:1fr 1fr;gap:14px}:root #encoderWorkspace .metric.hero{grid-column:1/-1;border-right:0;padding-bottom:10px;border-bottom:1px solid var(--line)}:root #encoderWorkspace .metric:nth-child(2){padding-left:0}:root #encoderWorkspace .sum-body{padding:0 14px 16px!important}:root #encoderWorkspace .sum-head{padding:14px!important}:root #encoderWorkspace .enc-tabs{padding:14px}:root #encoderWorkspace .sec-all{width:100%}:root #encoderWorkspace .rail-btn{min-height:44px}:root #encoderWorkspace .sum-body .table-wrap{overflow:auto}}
@media(prefers-reduced-motion:reduce){:root #encoderWorkspace *{animation:none!important;transition:none!important}}

/* Active ancestors inherit the selected brand in both skins, including rail mode. */
:root .mp-menu .mp-grp.has-on>.mp-top-item .icon,:root .mp-menu .mp-grp.has-on>.mp-top-item svg{color:var(--nav-active)!important}
:root .mp-menu .mp-sub-item[aria-current=page]{background:var(--nav-active-bg)!important;color:var(--nav-active)!important}
:root.menu-rail .mp-menu .mp-grp.has-on>.mp-top-item{background:var(--nav-active-bg)!important;color:var(--nav-active)!important}
:root[data-accent]{--primary-soft:var(--d-soft);--mint-selected:var(--nav-active-bg)}
:root[data-accent][data-theme=night]{--primary-soft:rgba(var(--accent-bright-rgb),.14);--mint-selected:var(--nav-active-bg)}
:root .workspace-switch .workspace-logo{background:var(--d-primary,#214edb);color:#fff}
